More PHP and MySQL questions....
|
|||
|
Rank: ? (4280)
Member #: 5260 |
Is there a PHP function that return the total number of records in a table?
Dreams are stories, but my life is just one bad dream. :P
|
||
|
|||
|
|||
|
Rank: ? (767)
Member #: 11085 |
If by table, you mean a MySQL table, then yes, there is. mysql_num_rows(), along with a query selecting all rows of a table (for instance, "SELECT * FROM `table`") would give you the total number of records.
- relpats_eht
|
||
|
|||
|
|||
|
Rank: ? (4280)
Member #: 5260 |
I was hoping for function that didn't require query of selecting all.
Oh, well. Thanks, relpats_eht.
Dreams are stories, but my life is just one bad dream. :P
|
||
|
|||
|
|||
|
Rank: ? (767)
Member #: 11085 |
Code:
...? » Post edited 2007-08-05, 09:33am by relpats_eht.
- relpats_eht
|
||
|
|||
|
|||
|
Rank: ? (4280)
Member #: 5260 |
Creating a function to do this. I should have thought of that.
*Mr Grumpy Ow! Again, thank you, relpats_eht.
Dreams are stories, but my life is just one bad dream. :P
|
||
|
|||
|
|||
|
Rank: ? (767)
Member #: 11085 |
If you use that function, make sure not to pass any user data to it. It isn't secure.
- relpats_eht
|
||
|
Please login or register to post a reply.