I am trying to make a very simple sql query like this for the propel criterion:
SELECT count(id_user) FROM myTable WHERE id_page = 5
I did not find any documentation information.
Do you have an idea?
$c = new Criteria(); $c->add(myTablePeer::ID_PAGE,5); $count = myTablePeer::doCount($c);
If you want to issue SELECT COUNT (*) based on the current ModelCriteria, you can also do
$yourCriteria->count();
This will return you the number of results.
Source: https://habr.com/ru/post/1747992/More articles:QGraphicsItem redraws - c ++Create a new log file every time my program starts - javaSplitting a group of functions into an include file in C? - cFCKeditor in jQuery ui dialog not working - jqueryError using custom xslt - .netspaces in python - pythonPinax: ะฝะฐัััะพะธัั ััะตั ะธ ะฟัะพัะธะปั - djangoMemory management and viewDidUnload? - objective-cHow to efficiently send large files from a database to a browser? - c #Get html that is created via AJAX in webclient - c #All Articles