Help me queries are not working in php

Guys!!!

PLS HELP I want to add the all the rows i tried the query which will work in mysql as well as other databases

Assume that i have table below like this

NAME MARKS
S 10
A 50
N 40
D 10
E 50
E 20
P 20

SUM(SALES)=200

I have written the query

$grid->render_sql(“SELECT SUM(MARKS) FROM top_tablename”, “Cities”,“sales”); //not working

in mysql when i type
Select SUM(MARKS) FROM TABLEname i will get the output …

But this above query is not working. My query is correct

Hi,

it would be more correct to use alias in your query:

$grid->render_sql(“SELECT SUM(MARKS) as sales FROM top_tablename”, “Cities”,“sales”);

Thank YOU VERY MUCH IT WORKED PERFECTLY FINE FOR ME alex…

I NEED YOUR HELP IN FUTURE IF I HAVE ANY QUERIES WITH MYSQL CONVERTING IT INTO DHTMLX

With REGARDS
SANDEEP V