0

В чем здесь ошибка

mysql_query("SELECT name, text, time FROM '$db_name' WHERE id > '$last_id'")

пишет

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in Z:\home\localhost\www\select_db.php on line 23 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 ''comments_soviet_independent' WHERE id > '3'' at line 1

Если заменить $db_name на строчку comments_soviet_independent, все ок. При этом

$name_db == "comments_soviet_independent"  // равны

1 ответ 1

1

без кавычек попробуй

mysql_query("SELECT name, text, time FROM $db_name WHERE id > $last_id")

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.