Re: Newbie mysql problem understanding result and id?



On 29 May 2005 13:17:03 -0700, el_roachmeister@xxxxxxxxx wrote:
> I can't understand why the output from this is not '7'?
>
> $query = "SELECT * FROM contacts";
> $result = mysql_query($query);
> echo mysql_result ($result, 7, "id");

Assuming you did add "order by id", either one or more of
1) you didn't connect to the mysql server properly
2) you didn't select the proper database
3) there is no contacts table
4) the contacts table does not have an id field
5) the contacts table contains less than 7 records
6) one or more records with id<=7 do not exist


--
Firefox Web Browser - Rediscover the web - http://getffox.com/
Thunderbird E-mail and Newsgroups - http://gettbird.com/
.