$conn_sv = "localhost";
$conn_user = "root";
$conn_pwd = "password";
$conn_db = "atutor15_beta";
@mysql_connect($conn_sv, $conn_user, $conn_pwd) or die(mysql_error());
@mysql_select_db($conn_db) or die(mysql_error());
$sql_query = "SELECT * FROM at_courses where title='$get_srarchtxt'";
$sqlquery = @mysql($sql_query) or die (mysql_error());
$num =@msql_num_row ($sql_query) or die (mysql_error());
echo ($num);
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%%'' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%%'' at line 1
น่าจะเป็นที่ LIKE ต้องใช้ Single Cope LIKE '%$get_srarchtxt%' ไม่ใช่ Double Cope "%$get_srarchtxt%" น่ะครับ