Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function some_function($accId){
- $q = DB::Select("SELECT ca.*, ch.* FROM credit_accounts as ca, credit_history as ch WHERE ch.acc_id=ca.id AND ch.acc_id='$accId' ORDER BY ch.acc_id DESC");
- if (count($q) > 0){
- // if query fetch some data, then this if condition works fine
- $val="condition true";
- }
- else{
- // if there is no data against this query then else block not runs and return "readyState": 4 error. but it should return "condition false".
- $val = "condition false";
- }
- return $val;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement