madcorp / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Problems with sorting integer #760

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setting up a table with a field which values are integers
2. add field to a grid
3. sort this fields values (arrow up, arrow down)

What is the expected output? What do you see instead?
Grid won't sort the whole number. For example 11 comes after 109, or 14 after 
138.

Please insert the appropriate values;
                    Zend Framework version: 1.11
ZFDatgrid Version (Bvb_Grid::getVersion()): 0.7
                          Operating system: Win 7 prof.
                               PHP Version: 5
               Database Server and version: MySQL 5.1.41 
Source Adatapter:

Please provide any additional information below.

Original issue reported on code.google.com by klaus.ma...@googlemail.com on 8 Sep 2011 at 3:36

GoogleCodeExporter commented 9 years ago
Hi,

What is the type of your db column?

Best Regards,
Bento Vilas Boas

Original comment by bento.vi...@gmail.com on 15 Sep 2011 at 4:05

GoogleCodeExporter commented 9 years ago
Hi Bento!

The type of this column is integer (int), should I change it to varchar?

Thanks for your answer.

Original comment by klaus.ma...@googlemail.com on 15 Sep 2011 at 5:28

GoogleCodeExporter commented 9 years ago
Hi,

Can you please email me info[something here]zfdatagrid.com the output query?

after calling grid->deploy();

insert this code

echo $grid->getSelect();

Best Regards,
Bento Vilas Boas

Original comment by bento.vi...@gmail.com on 30 Sep 2011 at 5:57

GoogleCodeExporter commented 9 years ago
unfortunately this email-adress won't work

I'll put the requested result right here:

SELECT `ps`.*, `ags`.`agency_name`, `ds`.`domain_id`, `ds`.`url`,
`ds`.`si`, `ds`.`backlinks_domain`, `ds`.`domain_annotations`,
`ds`.`updated_at`, `css`.`characteristic_name`, `cs`.`category_name`,
`ts`.`topic_name` FROM `partners` AS `ps`
 LEFT JOIN `agencies` AS `ags` ON ps.agency_id = ags.agency_id
 LEFT JOIN `domains` AS `ds` ON ps.partner_id = ds.partner_id
 LEFT JOIN `characteristics` AS `css` ON ds.characteristic_id =
css.characteristic_id
 LEFT JOIN `domain_categories` AS `dcs` ON ds.domain_id = dcs.domain_id
 LEFT JOIN `categories` AS `cs` ON dcs.category_id = cs.category_id
 LEFT JOIN `domain_topics` AS `dts` ON ds.domain_id = dts.domain_id
 LEFT JOIN `topics` AS `ts` ON dts.topic_id = ts.topic_id GROUP BY
`ds`.`domain_id` ORDER BY `ps`.`partner_id` ASC

Original comment by klaus.ma...@googlemail.com on 25 Oct 2011 at 4:38

GoogleCodeExporter commented 9 years ago

Original comment by licentia...@gmail.com on 6 May 2012 at 6:07