Re: Passing on an "ID"

From: Date: Mon, 22 Apr 2002 11:35:34 +0000
Subject: Re: Passing on an "ID"
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-18722@lists.php.net to get a copy of this message
In article <20020422105225.76797.qmail@pb1.pair.com>, afrancis@camerondesign.co.uk says... > > The button "Email Comments" links to the following page: > > <?include ("../config.inc.php"); ?> > > <?php > > // setup SQL statement to retrieve link that we want to edit > $SQL = " SELECT * FROM $tablename1 "; > $SQL = $SQL . " WHERE id = $id "; > > // execute SQL statement > $ret = mysql_db_query($dbname,$SQL,$link); > > // retrieve values > $row = mysql_fetch_array($ret); > $email = $row["email"]; > $title = $row["title"]; > $comments = $row["comments"]; > $title = $row["title"]; > > else {echo(mysql_error()); > > I get an error at $row = mysql_fetch_array($ret); Wiyhout seeing the message this is a guess, but have you considered using mysql_error to check the status of your query? -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.db (#18722) next »