mysql - Syntax error when use query in php -


this question has answer here:

anybody me solve query, error syntax error,

unexpected '' (t_encapsed_and_whitespace), expecting identifier (t_string) or variable (t_variable) or number (t_num_string)

 $sl = "select * sanpham id='$_get['id']'"; 

careful arrays , keys.

 $sl = "select * sanpham id='{$_get['id']}'"; 

or

 $sl = "select * sanpham id='" . $_get['id'] . "'"; 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

android - How to prevent keyboard from closing when bottom dialog is open? -