0
얘들 아, 나는 모든 데이터를 row_cats
에 저장하고 하나씩 차례로 호출하려고하는데 여기에 갇혀있다.mysqli_multi_query while while loop php
$get_cats = "select * from categories";
$get_cats .= "select * from products order by rand() LIMIT 0,4"
$run_cats =mysqli_multi_query($con,$get_cats);
while($row_cats=mysqli_fetch_array($run_cats)){
$cat_id = $row_cats['cat_id'];//from first query
$cat_title = $row_cats['cat_title'];
$pro_id=$row_products['products_id'];//from second query
$pro_title=$row_products['product_title'];
$pro_cat=$row_products['cat_id'];
$pro_image=$row_products['product_img1'];
은 SQL이 그런 식으로 작동하지 않습니다 시도 할 수 있습니다 – Forbs