Skip to main content
Topic: save a query result (Read 1454 times) previous topic - next topic

save a query result

Hi

how do i save a query result? i have to made a math operation and save the result but a cant do that.
for example
"SELECT qt, tempo, qt * tempo AS preco FROM pecas"
it a test the query the output its ok but how i make it save the output to preco field? and visible on web-page?

many thanks

Re: save a query result

Reply #1
There's no direct way of doing this in phprad interface currently but you can modify the controller to save the generated query.

to get the last executed query simply call $db->getLastQuery();

Re: save a query result

Reply #2
many tks,
i discovered how to doit.
another question,

 its possible export all the project (phprad and database) i want share the project in the forum, i think it will be a good strating point for new users without programing skills in data bases and php.