如何在php中搜索查询?

时间:2015-08-11 10:45:07

标签: php mysql

错误是程序无法搜索关键字。

以下是代码:

Score  District  Age  Group  Gender
17     B         23    Red   1
12     A         61    Red   0
11.7   A         18    Blue  0
10     B         18    Red   0
.
.
etc.

1 个答案:

答案 0 :(得分:2)

WHEREFROM条款中需要空格

" FROM english, maranao".

" WHERE english.keyword_num = maranao.keyword_num and english.word = '$search'";

并且不要使用mysql Why shouldn't I use mysql_* functions in PHP?

尝试学习Prepared statement