I need a little select command help!

QuestionsI need a little select command help!
mike asked 10 years ago

Hello, right now I have a gird that is bound to a table like so
$g->table = "[pltdata].[dbo].[Web_BoneyardTable]";

Now I have been asked to filter the grid so only certain "grades" of material show. Grade is one of my table fields. I assume I need to follow the convention below, but not sure how I would do it. I will need to show multiple grades so I think it would be grade = 'value1' ot grade = 'value2' etc…
//$g->select_command = "select * from (select * from invheader) as o";

// pass the cooked columns to grid

3 Answers
Abu Ghufran answered 10 years ago

Hello,

Yes, it should work with select_command.
e.g.

$g->select_command = "select * [pltdata].[dbo].[Web_BoneyardTable] where grade = 'value1' ot grade = 'value2'";

mike answered 10 years ago

Now i get this
$g->select_command = "select * [pltdata].[dbo].[Web_BoneyardTable] where grade = 'value1' ot grade = 'value2'";

Looking through the forum as well

mike answered 10 years ago

Nevermind I found my issue, I missed the FROM keyword.
Hope that doesn't setup the type of day I'm going to have!

Your Answer

15 + 20 =

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?