Re: [PHP-DB] mysql_fetch_array problem

2001-07-09 Thread bleythbe
I was having the same problem for a while... although, I was using this: for($i=0;$i Good luck, Ben Quoting BrianSander <[EMAIL PROTECTED]>: > Greetings, > > I'm experiencing the strangest problem and I was > wondering if anyone > else has had the same problem. > > I have a fairly simple scr

Re: [PHP-DB] mysql_fetch_array problem...!

2001-03-05 Thread JJeffman
You must use a loop to show each row of your query. "mysql_fetch_array($result)" only get the current row. while($row = mysql_fetch_array($result) ){ // do something } The "mysql_fetch_array" function returns an associative array where you can use the field names to have access to its val

Re: [PHP-DB] mysql_fetch_array problem...!

2001-03-05 Thread Darryl Friesen
> How can I refer to one specific row in this query..? > What I mean is, how can i refer to result row number 4...? > > If I only selected rows from one table I could do something like this: > > $i = mysql_fetch_array($sql) ; > echo "$i[4]" ; Actually, no. mysql_fetch_array return the _current r

RE: [PHP-DB] mysql_fetch_array problem...!

2001-03-05 Thread Andrew Hill
Trond, What is your table structure? I'm guessing you need a different query. Also, be aware that mysql_fetch_array returns an array with the field name as value, so: $sql="select fields from table where id = $id"; $connection_handle=(mysql_connect($user, $pass, $host); mysql_select_db($databa