sql >> Base de Datos >  >> RDS >> Mysql

Advertencia:mysql_num_rows():el argumento proporcionado no es un recurso de resultado de MySQL válido

Cambiar $result = @mysql_query ($query);

con

$result = mysql_query ($query) or die(mysql_error());

y ver si tienes algún error.

EDITAR:

Te saltaste una coma después de oc.price y antes de prd.products_id. Cambie su consulta así:

$query = "SELECT us.users_id, us.users_first_name, us.users_surname, us.users_business, 
             ord.order_id, ord.users_id, ord.total, ord.order_date,  
             oc.oc_id, oc.order_id, oc.products_id, oc.quantity, oc.price/*here*/,/**/
             prd.products_id, prd.products_name, prd.price      
         FROM users AS us, orders AS ord, order_contents AS oc, products AS prd  
         WHERE ord.order_id=$id
         AND us.users_id = ord.users_id
         AND ord.order_id = oc.order_id
         AND oc.products_id = prd.products_id    
         ";