Disregard the previous post. I figured out that mysql_num_rows() returns the
number of rows from the result of a SELECT query.

"Bill Blancett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am new to PHP so I am need someone to explain this problem to me. I am
> trying to read items from a table and store them into an array. My current
> function of choice to use is "mysql_fetch_array". The documentation says
> that it returns FALSE if there are no more rows returned, but yet when the
> query does not return a result set, It does not return anything. So the
> basic question is how do I test for a query that does not return for any
> results ? Here is some of my code below:
>
> $result = mysql_db_query ("GradAdmissions","select * from applicant where
> applicant_id = 17");
> while ($row = mysql_fetch_array ($result))
>    {
>     echo "applicant_id: ".$row["applicant_id"]."<br>\n";
>     echo "member_id: ".$row["member_id"]."<br>\n";
>     }
> mysql_free_result ($result);
>
> Thanks in advance
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to