PDO::ATTR_CASE breaks Editor record count query
PDO::ATTR_CASE breaks Editor record count query
In my php server scripts I use "$db->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER);" to force all sql server column names to come back as upper case in fetches so that $row['COLNAME'] always matches and I don't have to guess what case I used elsewhere. For better or worse, this works for me.
In the Editor.php script, where it counts the records and filtered records, it references $ssp_full_count['cnt'] and I've had to change this to $ssp_full_count['CNT'] since my database handle has CASE_UPPER attribute set otherwise it fails to set the record counts correctly.
This discussion has been closed.
Replies
Thanks for letting me know about this. I'll look at implementing support for PDO::ATTR_CASE in 1.7.1.
Regards,
Allan
Just been looking at this again, and you can do:
The
resource()method of theDatabaseclass just returns the PDO connection, so you can use any PDO methods on it.Allan