SQL_CALC_FOUND_ROWS

33 views
Skip to first unread message

Jonathan M.

unread,
May 31, 2013, 12:30:55 PM5/31/13
to sqlk...@googlegroups.com
Hello,

I am having trouble generating the following query:

SELECT SQL_CALC_FOUND_ROWS  `my_table`.* FROM `my_table` LIMIT 10;

The problem is SQL_CALC_FOUND_ROWS. If i add it to the query via fields fn a comma is appended after it which causes mysql syntax error. If you noticed the quoted query above, it does not have one.
Is there a way to generate the above query or a suggested work around?

Thank you for your time

Jonathan

Jonathan M.

unread,
May 31, 2013, 12:48:11 PM5/31/13
to sqlk...@googlegroups.com
...OR if that's not possible someone to share with me how you can get an affected rows count :)

Jonathan M.

unread,
May 31, 2013, 12:56:43 PM5/31/13
to sqlk...@googlegroups.com
It seems it was right in front of my nose. You need to use the modifier fn :)
Reply all
Reply to author
Forward
0 new messages