Привет!
Столкнулся с проблемой, прошу вашей помощи.
есть у меня переменная $query, которая в результате цикла становится равна
Цитата |
theme = "$Krasota" OR theme = "$Seks" OR theme = "$Moda" ORDER BY id DESC LIMIT $start_post, $post_count |
$result = mysqli_query($mysqli, "SELECT * FROM rss_news WHERE $query");
Цитата |
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\AppServ\www\rss\fashion\showmore.php on line 57 |
$result = mysqli_query($mysqli, "SELECT * FROM rss_news WHERE theme = "$Krasota" OR theme = "$Seks" OR theme = "$Moda" ORDER BY id DESC LIMIT $start_post, $post_count");
$result = mysqli_query($mysqli, "SELECT DISTINCT theme FROM rss_news WHERE category LIKE 'Гламур' ");
while($row = mysqli_fetch_array($result)) {
$query = $query.'theme = "$'.$row['theme'].'" OR ';
}
$query = substr($query, 0, strlen($query)-1);
$query = $query.'DER BY id DESC LIMIT $start_post, $post_count';
$result = mysqli_query($mysqli, "SELECT * FROM rss_news WHERE theme = "$Krasota" OR theme = "$Seks" OR theme = "$Moda" ORDER BY id DESC LIMIT $start_post, $post_count");
Цитата (Porvoocio @ 10.04.2012 - 06:18) |
Коннект правильный. Повторюсь, когда делаю
все работает |
$query = "`theme` = '$Krasota' OR `theme` = '$Seks' OR `theme` = '$Moda' ORDER BY `id` DESC LIMIT $start_post, $post_count"
echo $theme;