MySQL Forums
Forum List  »  Newbie

Simple Query
Posted by: Matt D
Date: July 08, 2005 11:15PM

Hi everyone,

I have a simple problem (i think), but I cannot figure out how to fix it.

I am creating a solution in PHP. Anyway, I have a database with a table called 'Online.' It is a HEAP database.

In my PHP solution I call the following code to get a result:

$result = mysql_query("select session_id from online;");
$total_records = mysql_num_rows($result);

Anyway, the $total_records is 0. Even though there are 3 records. I tried the same exact query in the mysql command-line client and it pulled up all the records. Ive also tried "select * from online," etc. I have also tried chainging the ONline table to MyISAM, but still the same result.

Ive tried the same query but on a different table and it works fine. Any suggestions?

Thank You,

-Matt

Options: ReplyQuote


Subject
Written By
Posted
Simple Query
July 08, 2005 11:15PM
July 09, 2005 10:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.