Welcome Guest, Not a member yet? Register   Sign In
Cannot Pass More than two variable to view
#3

(04-21-2018, 02:25 PM)Wouter60 Wrote: This is line 61:
PHP Code:
<P>Total Spends is <?=$row->price?></P> 

It gives an error because $row is an array, not an object.

So change it into:
PHP Code:
<p>Total Spends is <?=$row["price"];?></p> 
like the way you've done in line 38 to 43.
I have added this code. But it's gave only one product price "Total Spends is 128000" But total spend should be 139909. This correct calculation comes with var_bump like "object(stdClass)#26 (1) { ["SUM(price)"]=> string(6) "139909" }".  Have you any idea, Why does not come this correct sum value to the view? But its came to header of the view as var_dump. Looks my screenshot.  

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: Cannot Pass More than two variable to view - by sanjaya - 04-21-2018, 09:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB