Jump to content

Returned Results Without Loop


The Little Guy

Recommended Posts

Is there a different way that I can go through results from a database without using a loping method such as the "while loop"?

 

If you have a constant amount of rows returned, mysql_result( $resource, $rowNum, $colNum ) will return the given cell. This is kinda useless for dynamic data though.

Here is my query:

 

(SELECT COUNT(id) AS count FROM users)
UNION
(SELECT COUNT(id) as count FROM users GROUP BY gender)
UNION
(SELECT COUNT(id) as count FROM images)
UNION
(SELECT COUNT(id) as count FROM videos)
UNION
(SELECT COUNT(id) as count FROM events)
UNION
(SELECT COUNT(id) as count FROM leagues)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.