c-o-d-e Posted December 6, 2009 Share Posted December 6, 2009 This is incredibly confusing me. Parse error: syntax error, unexpected T_STRING in /home/jeanie/public_html/Updates/updatediv.php on line 4 Line 4 = $query etc etc <?php include '../config.php'; $query = mysql_query("SELECT * FROM News ORDER BY Posted DESC LIMIT 3") or trigger_error("Query failed: " mysql_error()); $row = mysql_fetch_array($query); echo '<h4 style="margin:0px;">'. date("d/m/Y H:i:s", $row['Posted']) .'</h4>'; echo '<p style="margin:0px;">'. substr($row['Article'],0,100) .'<a href="/allnews.php">Read More</a></p><br />'; echo '<center><a href="allnews.php">View All</a></center>'; ?> I don't get the problem.. Link to comment https://forums.phpfreaks.com/topic/184164-simple-parse-error/ Share on other sites More sharing options...
Virvo Posted December 6, 2009 Share Posted December 6, 2009 $query = mysql_query("SELECT * FROM News ORDER BY Posted DESC LIMIT 3") or trigger_error("Query failed: " . mysql_error()); You forgot the period (DOT) after "Query failed: " Link to comment https://forums.phpfreaks.com/topic/184164-simple-parse-error/#findComment-972365 Share on other sites More sharing options...
c-o-d-e Posted December 6, 2009 Author Share Posted December 6, 2009 Yeah I realised about 15 minutes after I posted it I was comparing queries. Link to comment https://forums.phpfreaks.com/topic/184164-simple-parse-error/#findComment-972441 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.