Re: Newbie mysql problem understanding result and id?
- From: Ewoud Dronkert <firstname@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 29 May 2005 22:32:17 +0200
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/
.
- References:
- Newbie mysql problem understanding result and id?
- From: el_roachmeister
- Newbie mysql problem understanding result and id?
- Prev by Date: Re: ssh or ftp for writing scripts?
- Next by Date: Re: Newbie mysql problem understanding result and id?
- Previous by thread: Re: Newbie mysql problem understanding result and id?
- Index(es):