daniyorik
Новичок
Здравствуйте выдает ошибку:
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 'FROM aib_post LEFT JOIN aib_users ON aib_users.user_id = '' LEFT JOI' at line 15
я понял что синтаксическая ошибка на 15 линии, только как ее исправить подскажите пожалуйста
Вот сам запрос:
"SELECT
aib_post.id,
aib_post.title,
img,
text,
date,
id_town,
price,
aib_post.confirm,
is_actual,
time_over,
aib_users.name AS uname,
aib_users.email,
aib_categories.name AS cat
FROM
aib_post
LEFT JOIN aib_users ON aib_users.user_id = '$user'
LEFT JOIN aib_categories ON aib_categories.id = aib_post.id_categories
WHERE aib_post.id_user = '$user'
ORDER by date DESC
";
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 'FROM aib_post LEFT JOIN aib_users ON aib_users.user_id = '' LEFT JOI' at line 15
я понял что синтаксическая ошибка на 15 линии, только как ее исправить подскажите пожалуйста
Вот сам запрос:
"SELECT
aib_post.id,
aib_post.title,
img,
text,
date,
id_town,
price,
aib_post.confirm,
is_actual,
time_over,
aib_users.name AS uname,
aib_users.email,
aib_categories.name AS cat
FROM
aib_post
LEFT JOIN aib_users ON aib_users.user_id = '$user'
LEFT JOIN aib_categories ON aib_categories.id = aib_post.id_categories
WHERE aib_post.id_user = '$user'
ORDER by date DESC
";