mysql - order by sql query error -
$post_items = $db->query("select post_id,content,date,category_id post_items join user on(post_items.user_id = user.user_id) post_items.user_id =" . $userid)
how can include order in case? tried
$post_items = $db->query("select post_id,content,date,category_id post_items join user on(post_items.user_id = user.user_id) post_items.user_id =" . $userid ."order post_id");
please, apply space between field , order keyword, , use tablename if columnaname ambiguse in query use join :
$post_items = $db->query("select post_id,content,date,category_id post_items inner join user on post_items.user_id = user.user_id post_items.user_id =" . $userid ." order post_items.post_id ");
Comments
Post a Comment