This is the link MySQL code, the file name is link.php
$link =mysql_connect (sae_mysql_host_m. ': '). Sae_mysql_port,sae_mysql_user,sae_mysql_pass);
mysql_select_db (sae_mysql_db, $link);
mysql_query ("Set names UTF8");
?>
This is the code queried with the SQL statement, the file name is testmysql.php
Include ("link.php");
$name = $_get[' name '];
$ticketid = $_get[' Ticketid ');
$id =$_get[' id '];
$result = mysql_query ("select * from 1 WHERE name = ' $name ' and ticket number = ' $ticketid ' and id number = ' $id '", $link);
while ($row =mysql_fetch_array ($result)) {
echo $row [' name ']. " " . $row [' Ticket number '];
echo "
";
}
Mysql_close ($link);
?>
Warnings given after the run:
Warning:mysql_fetch_array () expects parameter 1 to BES resource, boolean given in query/testmysql.php on line 7
Reply to discussion (solution)
Do the field name in Chinese does not seem very good, all say the seventh line of error, their own judgment bar ~
Mysql_query execution error, check that the SQL statement is correct.
Print under result to see if the resource type
Mysql_query execution error, check that the SQL statement is correct.
I began to suspect that this is the problem, but I use SQL statements in the database software query is right AH!
Mysql_query execution error, check that the SQL statement is correct.
I began to suspect that this is the problem, but I use SQL statements in the database software query is right AH!
Variables are wrapped in {}.