I have the following code
<html>
<head>
<title>Eye Contact - Century to Century</title>
<link rel="stylesheet" href="eye01.css" type="text/css" />
</head>
<?php
$db = mysql_connect("localhost","root","");
if (!$db){
print "error - Could not connect to MySQL";
exit;
}
$er = mysql_select_db("touch_art1");
if(!$er){
print "error - Could not select the database";
exit;
}
$query = $query = "SELECT * FROM `story` WHERE approved = 'Y';
$query2 = $query = "SELECT * FROM `comment` WHERE approved = 'Y';
$query3 = $query = "SELECT * FROM `comment` WHERE approved = 'N';
$query4 = $query = "SELECT * FROM `story` WHERE approved = 'N';
$result = mysql_query($query);
$result2 =mysql_query($query2);
$result3 =mysql_query($query3);
$result4 =mysql_query($query4);
//check to see if query worked
if (!$result)
{
echo "Query on Connection failed!";
// exit
}
else
{
echo 'succees';
// process results
while($row = mysql_fetch_row($result)) {
$date = $row[1];
echo "$date";
$name =$row[2];
echo"$name";
}
}
?>
</html>
I keep getting a parse error at
[code=php]$query2 = $query = "SELECT * FROM `comment` WHERE approved = 'Y';
Could someone help ?