MySQL Forums
Forum List  »  PHP

sql code works in database but didint works in php.
Posted by: harshith vemula
Date: June 13, 2018 04:53AM

$test=1;
SELECT balance,`user_id`=$test FROM `wpwoo_wallet_transactions` WHERE `transaction_id`=(SELECT MAX(`transaction_id`)FROM wpwoo_wallet_transactions

This query works in sql and when i try to use in php i am unable to get the output.plz help me.
I want the balance of specific user of his maximum transaction id.
i am new to sql in php plz help me.

Options: ReplyQuote


Subject
Written By
Posted
sql code works in database but didint works in php.
June 13, 2018 04:53AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.