Re: [PHP-DB] Warning: Unable to jump to row...

2003-03-31 Thread Ronan Chilvers
Hi Ben

Comments inline 

On 31 Mar,2003 at 13:46 Benjamin Trépanier wrote:


> 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")));
> 
> 


You should try using one of mysql_fetch_array() / mysql_fetch_row() to step through 
the recordset.  Something along the lines of

$id$titre\n";  
// \n above to keep the html source reasonably tidy
}

?>



> ?>
> 
> 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
> 


Hope this helps.

-- 
Ronan
e: [EMAIL PROTECTED]
t: 01903 739 997
w: www.thelittledot.com

The Little Dot is a partnership of
Ronan Chilvers and Giles Webberley

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Warning: Unable to jump to row...

2003-03-31 Thread Benjamin Trépanier
Hi, 

I'm trying to using a  news script and improve somes with a query.


$req = MYSQL_QUERY("SELECT * FROM $TBL_NEWS");
$res = MYSQL_NUM_ROWS($req);

?>







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

Or

Currently he is always showing row #5...

I put my id_news_  in a echo and the variable is ok.. I really dont
understand

Thanks for your help!

BEn




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php