Re: [PHP] skipping a WHILE loop in mysql_fetch_*()

2002-04-09 Thread Robert Cummings
Erik Price wrote: > > I have always retrieved database information using the following general > format: > > mysql_connect($host, $user, $password); > mysql_select_db($database); > $query = "select * from table"; > $result = mysql_query($query); > while ($row = mysql_fe

[PHP] skipping a WHILE loop in mysql_fetch_*()

2002-04-09 Thread Erik Price
I have always retrieved database information using the following general format: But sometimes I am searching for something specific, with a primary key as my WHERE clause. In other words, I will only EVER get one result. In this case, a while loop seems to be overkill, since it will only