please correct my SQL

wxdqz

New Member
I'm trying to get my test table to join with my login table where the ID's are the same where the registration number ='s 7234907, then print the table. This doesn't work.

$result3 = mysql_query( "SELECT * FROM test JOIN login ON test.id = login.id WHERE registration = '7234907'" );
print "<table border=1\n";
while ( $a_row = mysql_fetch_row( $result3 ) )
{
print "<tr>\n";
foreach ( $a_row as $field )
print "\t<td>$field</td>\n";
print "</tr>\n";
}
print "</table>\n<br><hr size=\"1\">";
 
Back
Top