-2

我有一个基本的疑问。

我有这个例子:

$sql = mysql_query("SELECT * FROM admin where id =  username='$username' and password = '$password' LIMIT 1");

有可能在浏览器中看到这个 sql 命令在做什么吗?看看对不对。。

谢谢。

4

2 回答 2

1
$a = "SELECT * FROM admin where id =  username='$username' and password = '$password' LIMIT 1";
echo $a;
$sql = mysql_query($a); // use mysqli instead 
于 2013-09-27T16:18:48.243 回答
0

if you will print the $sql it will print #resurce #4

you need to do:

$q = "SELECT * FROM admin where id =  username='$username' and password = '$password' LIMIT 1";

print_r($q);

and you see it in the network tab on the console or in the browser if you print your request

于 2013-09-27T16:18:53.243 回答