Here is the function: function print_new_story(){ $query = "SELECT * FROM news ORDER BY id DESC LIMIT 1"; $result = mysql_query($query); $num_results = mysql_num_rows($result);
for ($i=0; $i < $num_results; $i++) { $row = mysql_fetch_array($result); echo '<h2><a href="#">: '; echo $row['title']; if(!$row['date'] == 0){ echo ' - '; echo date("d-M-y", $row['date']); } echo ' :</a></h2><br>'; include $row['int_location']; } } and here is the error message: Parse error: parse error in \\johnh\c\co2 busters\includes\functions.php on line 81 ----- Original Message ----- From: "Nick Wilson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 29, 2002 11:08 PM Subject: Re: [PHP] Parse Error(newbie) > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > * and then [EMAIL PROTECTED] declared.... > > I get a parse error on this line > > > > $query = "SELECT * FROM news ORDER BY id DESC LIMIT 1"; > > > > I believe that it is an error in the SQL statement > > Nothing wrong with that. Let's have the whole error msg and the code > surrouding the line it says it's on please.... It might well not be on > that line at all. > - -- > Nick Wilson // www.tioka.com > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE89NLaHpvrrTa6L5oRAiZ0AJ9fXPhupt203ghx8nNnDkgrtkgpsgCfQRFO > tpYkUeHN5k9+EZxGuZbP34k= > =QCuq > -----END PGP SIGNATURE----- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php