SQL Query

QuestionsSQL Query
Ante asked 12 years ago

Hello,

i have downloaded free version of pgpgrid. The problem that i have is when i type custom SQL select command

example: "select * from table where somefield='something'"; it works

But when i add ORDER BY command, the table result is empty.

Where is the problem?

Regards,
Ante

1 Answers
Abu Ghufran answered 12 years ago

You need to use following params for order by. It should not be passed as custom sql.

$grid["sortname"] = 'client_id'; // by default sort grid by this field
$grid["sortorder"] = "desc"; // ASC or DESC
….
$g->set_options($grid);

Your Answer

2 + 10 =

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?