How to use a temporary table?

QuestionsHow to use a temporary table?
c3media asked 4 years ago

Hello Abu,

 

I woud like to use a temporary table in grid, any example to implement it?

1 Answers
Abu Ghufran Staff answered 4 years ago

Hello,
What you can do it to create temporary table using same database connection which phpgrid is using. Now when you use that connection in select_command querying temp table, it will find it and work.

$sql_temp_table = “CREATE TEMPORARY TABLE tableCosts …. “;

$d = new jqgrid();
$d->con->execute($sql_temp_table);

Now use your normal select query in select_command.

$sqlMain = “SELECT … FROM tableCosts”;

$d->select_command = $sqlMain;

Hope it help.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

2 + 9 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?