Forums

Sort Connectivity By Column

jparker 14 Dec, 2009
I am trying to figure out how to sort the database info by column in a desc fashion. I can't figure out how to do this. They seem to be sorting by column: cf_id now which isn't going to do me any good looking at a list of information that is not sorted in some reasonable manner.
GreyHead 14 Dec, 2009
Hi jparker,

You can use the 'ORDER by' box for this.

Bob
jparker 14 Dec, 2009
When I use ORDER BY 'fieldname' in the order fields box I get this error when I go to view my records: Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\Joomla3\components\com_chronoconnectivity\libraries\connection.php on line 300

what am I doing wrong?
GreyHead 14 Dec, 2009
Hi jparker,

You can't use straight quotes there. Either use ORDER BY fieldname or better ORDER BY `fieldname`

Bob
jparker 14 Dec, 2009
Thank you that worked! I guess I had been typing in the ORDER by in the text box and didn't need to! I have one more problem. My form is populating the database perfectly except for one field which fails to transfer any information to the database. I have been looking around for the problem and cannot figure this out either?
GreyHead 14 Dec, 2009
Hi jparker,

Check that the input name and column name of the non-saving entry match exactly.

Check that the value of the input is of a type that can be saved in that column i.e. not a string in an integer column.

Bob
This topic is locked and no more replies can be posted.