Getting syntax error in sql query using PHP and MySQL -


i getting following error while using mysql query.

error: #1064 - have error in sql syntax; check manual corresponds mysql server version right syntax use near 'o.user_id='rnayak2009@gmail.com' , (o.status='successful' or o.status='pending' @ line 1

i explaining query below.

select o.order_id,o.order_date,o.payment_amount,        o.status,op.pro_data_id,pd.image,pd.pro_id,pi.product_name db_order o left join db_order_products op on o.order_id = op.order_id  left join db_product_data pd on op.pro_data_id=pd.pro_data_id  left join db_product_info pi on pd.pro_id=pi.pro_id  o.user_id='rnayak2009@gmail.com'      , (o.status='successful' or o.status='pending') 

please me resolve error.

you may need repaste it, looks 2 errors pasted:

pi.  product_name 

and

pi.pro_idwhere 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -