|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Count rows and produce an integer
Hello all, Im new to the board....
I have a status table which can hold the values sold or selling, I want to do a count of how many items are currently selling and produce an integer as a result. EX: Items Selling: 3 Here is the start of my query: PHP Code:
|
|
#2
|
|||
|
|||
|
Make the sql 'COUNT(*) AS cnt'
Then $obj = mysql_fetch_object ($result); Then you have access to $obj->cnt for displaying it. Hope this helps, -KM- |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Count rows and produce an integer |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|