So I have the following scenario:
A user recharges his account via Adyen API and when the payment is processed I have a ProcessOrder method that receives the callback and does the following:
public function ProcessOrder($order)
{
//some order processing
$order_total = Yii::app()->db->createCommand()
->select('sum(`amount`) as total')
->from('`order_table`')
->where('`uid` = ' . $order->user->id)
->queryRow();
//send email with data
}
And I know the $order_total is failing but I don't know why...
I want to check logs but I don't know where they are (I'm new to this project) and I am trying to send me a email with the result. I cannot var_dump() the result and then die() because the class method is called via Adyen callback...
So basically my question is:
Where are the logs in a yii app OR
Why is the query failing? :-?
More Info
$order->user->id
has the correct value, I checked this with email :Dforeach($order_total as $row) { //send result }
and nothing... It's like the system does not have access to perform query s in that partPlease ask in comments if more information is needed
:)) This is stupid...
So I figured out why this does NOT work and the problem is this:
order_table and uid MUST NOT HAVE apostrophes ``! Without them, the query executes and everything works fine.
And yii app logs are in runtime folder :)
(And for those of you new to Yii and what to know how to call something from a query like this, the value is is $order_total['total'])*