Hi, I can't delete data from one of my tables. I get this error message..
Connected successfully
Could not delete table: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM vehicle' at line 1
<html>
<head>
<title></title>
</head>
<body>
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$conn = mysql_connect($dbhost, $dbuser);
if(! $conn )
{
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully<br />';
$sql = "DELETE * FROM vehicle";
mysql_select_db( 'carhire_website' );
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
die('Could not delete table: ' . mysql_error());
}
echo "Table deleted successfully\n";
mysql_close($conn);
?>
</body>
</html>
Help again please!! Thanking you