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?
Printable View
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?
set your recordset = to the command, then call it from your recodset as RS->Fields['count(*)']->value
toto
echo mysql_num_rows(mysql_query("select * from tableName"));
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
Thanks php man
I was close to what you posted and got frustated. i knew someone on vbforums would straignten me out