Re: Warning: Unable to jump to row...

From: Date: Tue, 01 Apr 2003 07:44:49 +0000
Subject: Re: Warning: Unable to jump to row...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26781@lists.php.net to get a copy of this message
Hi Ben Comments inline .... On 31 Mar,2003 at 13:46 Benjamin Trépanier wrote: <snip> > border="0"> > > <? > > $i!=$id_news_ > $id = mysql_result($req,$i,"id"); > $titre = mysql_result($req,$i,"titre"); > $date = mysql_result($req,$i,"date"); > $heure = mysql_result($req,$i,"heure"); > $heure = str_replace(":","h",$heure); > $news = stripslashes(trim(mysql_result($req,$i,"news"))); > > </snip> You should try using one of mysql_fetch_array() / mysql_fetch_row() to step through the recordset. Something along the lines of <?php while ($data = mysql_fetch_array($req)) { // handling code for each row here using references like this $id = $data["id"]; $titre = $data["titre"]; echo "<tr><td>$id</td><td>$titre</td></tr>\n"; // \n above to keep the html source reasonably tidy } ?> <snip> > ?> > > I want that my script show the content of the rows corresponding to my > Variable called: Id_News_ > > So the variable is moving well but when the scirpt is running and go to > display the row this code happend: > > Warning: Unable to jump to row number X > </snip> Hope this helps. -- Ronan e: ronan@thelittledot.com t: 01903 739 997 w: www.thelittledot.com The Little Dot is a partnership of Ronan Chilvers and Giles Webberley

« previous php.db (#26781) next »