[PHP] Re: I hate to do this - Parse error...
I think the Parse error might actually be on the last line of your query ( the .'; ). I tested that on my page and if I put in the query, as is, it gave me a parse error. Without the ending .' it was okay though. function view_post($tid){ __ $query = 'select forum_post.name, forum_post.time, forum_post.uid, forum_post.message, priv_user.username from forum_post, priv_user where forum_post.uid = priv_user.uid AND forum_post.tid = '.$tid.'; // HERE __ $result = mysql_query($query) or die(Query failed: $querybr . mysql_error()); $num_results = mysql_num_rows($result); for ($i=0; $i $num_results; $i++) { $row = mysql_fetch_array($result); echo $row['name'].' '.date('jS-M-Y',$row['time']).' '.$row['username'].\nbr; // Parse error here - line 24 echo $row['message'].\nbr; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: I hate to do this - Parse error...
Thanks. I've never seen an error that far up from the qouted line. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com Chris Earle [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I think the Parse error might actually be on the last line of your query ( the .'; ). I tested that on my page and if I put in the query, as is, it gave me a parse error. Without the ending .' it was okay though. function view_post($tid){ __ $query = 'select forum_post.name, forum_post.time, forum_post.uid, forum_post.message, priv_user.username from forum_post, priv_user where forum_post.uid = priv_user.uid AND forum_post.tid = '.$tid.'; // HERE __ $result = mysql_query($query) or die(Query failed: $querybr . mysql_error()); $num_results = mysql_num_rows($result); for ($i=0; $i $num_results; $i++) { $row = mysql_fetch_array($result); echo $row['name'].' '.date('jS-M-Y',$row['time']).' '.$row['username'].\nbr; // Parse error here - line 24 echo $row['message'].\nbr; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php