Seems the magic database.d.totrec is gone when using MivaSQL. Anybody
have any suggestions for getting a record count without looping
through the db?
Markus suggested I try 'count(id)', so I gave it (and a couple others) a shot. Here are the results:
Just to make sure the 'as' isn't the problem, I tried 'select ID as
total from s01_Categories', and it worked. That said, these did not.
Seems like It's close tho', or maybe not.
Debug : select count("id") as total from s01_Categories
Debug : COUNT with expression is unimplemented
Debug : select count(id) as total from s01_Categories
Debug : COUNT with expression is unimplemented
Debug : select count() as total from s01_Categories
Debug : Syntax Error: ')' unexpected
Debug : select count as total from s01_Categories
Debug : Syntax Error: Expected Open Parenthesis
Any suggestions?
have any suggestions for getting a record count without looping
through the db?
Markus suggested I try 'count(id)', so I gave it (and a couple others) a shot. Here are the results:
Just to make sure the 'as' isn't the problem, I tried 'select ID as
total from s01_Categories', and it worked. That said, these did not.
Seems like It's close tho', or maybe not.
Debug : select count("id") as total from s01_Categories
Debug : COUNT with expression is unimplemented
Debug : select count(id) as total from s01_Categories
Debug : COUNT with expression is unimplemented
Debug : select count() as total from s01_Categories
Debug : Syntax Error: ')' unexpected
Debug : select count as total from s01_Categories
Debug : Syntax Error: Expected Open Parenthesis
Any suggestions?
Comment