|
-
Oct 15th, 2002, 09:50 PM
#1
Thread Starter
Junior Member
display total records in a table resolved
I'm having a problem trying to display the results of this query on my web page the query is
SELECT count(*) from stories
how can i display the results?
Last edited by egiggey; Oct 16th, 2002 at 02:33 PM.
-
Oct 16th, 2002, 12:07 AM
#2
Lively Member
set your recordset = to the command, then call it from your recodset as RS->Fields['count(*)']->value
toto
-
Oct 16th, 2002, 07:32 AM
#3
Fanatic Member
echo mysql_num_rows(mysql_query("select * from tableName"));
-
Oct 16th, 2002, 09:12 AM
#4
Frenzied Member
toto what the hell are you talking about? he isn't doing a class and you didn't explain yourself very well, because that won't work.
egiggey: you need to fetch the query using mysql_fetch_array() to display the query results.
mysql_num_rows will only show how many rows it found.
$query = mysql_query("SELECT count(*) from stories");
while ($row= mysql_fetch_array($query)){
echo $row['change to field in stories'];
}
then that will show the results of the query
-
Oct 16th, 2002, 02:33 PM
#5
Thread Starter
Junior Member
Thanks php man
I was close to what you posted and got frustated. i knew someone on vbforums would straignten me out
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|