romioaa;10986063 wrote:
$result1 = mysql_query("SELECT * FROM trans, $connection");
Also, unless $connection contains a table identifier, the you have a SQL syntax error. To test if the query went ok, you should always
$query = "SELECT * FROM trans, $connection"
$result1 = mysql_query($query);
if (!$result)
{
echo 'An error occured. Please try again later';
error_log(mysql_error.' ('.mysql_errno().'): ' . $query);
# possibly: exit;
}
# If you terminate program execution with exit above, then you don't need "else"
else
{
# if the query was ok...
$row = mysql_fetch_assoc($result1);
# etc...
}
And the most likely error is that you should have terminated the string literal before , $connection, as in
$result1 = mysql_query("SELECT * FROM trans", $connection);