Custom variable from SQL Query

QuestionsCustom variable from SQL Query
Paata asked 9 years ago

Hi I want to use custom variable from SQL query not dependent from resualt of select_command
For example:
I want to setup custom path to upload file dependent from result of my SQL query.

$main = new jqgrid();
………………………
$tmp_path = $main -> execute_query($sql);
$array=$tmp_path->getRows();

$col = array();
$col["title"] = "file path";
$col["edittype"] = "file";
……
$col["upload_dir"] = $array['path']

But it's not work

Thankyou

1 Answers
Abu Ghufran answered 9 years ago

Easy option would be to save the uploaded files in some static folder e.g. temp
And using on_update event, run the query and use move_uploaded_file / move function to place in your desired folder.

Refer demos/editing/file-upload.php

Your Answer

8 + 6 =

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 0 / 5. Vote count: 0

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?