This topic is locked

Not sure what to use

5/5/2009 1:53:25 PM
PHPRunner General questions
lewisgr author

Hello,
I have records that I assigned special unique id's. It's based on the Month/Year the ID can be used and I also don't want it to show up it if's already been assigned.
Tables are:

Orders_LineItems

Tbl_UniqueID
In Tbl_UniqueID I have:

UniqueID

DateForUse formatted as (5/1/2009) meaning it can be used during this month
In Orders_LineItems I have:

UniqueID
I've tried doing the SQL Query but It doesn't show up in the ListMenu where I need it to be.
This is how I did it in SQL in Access:

SELECT Tbl_UniqueID.UniqueAutoID, Tbl_UniqueID.DateForUse, Tbl_UniqueID.UniqueID, Orders_LineItems.UBinID

FROM Orders_LineItems RIGHT JOIN Tbl_UniqueID ON Orders_LineItems.UBinID = Tbl_UniqueID.UniqueID

WHERE (((Orders_LineItems.UBinID) Is Null) AND ((Month([DateForUse]))=Month(Now())) AND ((Year([DateForUse]))=Year(Now())));


So is there anyway I can do something like this?
Thank You,

J
Jane 5/6/2009

Hi,
I'm not sure that I understand following issue.

I've tried doing the SQL Query but It doesn't show up in the ListMenu where I need it to be.



Where have you added your SQL query? Please give me more detailed description of what you're doing.

lewisgr author 5/6/2009

I added the TBL_UniqueID then on the next page I add the linked table Orders_LineItem.
But like I said this isn't available when I want to make the list box. Would this be considered a view?
I have also submitted a support ticket. But in short what I need to show in this list is all the records that have this month/year in the DateForUse column and I don't want to show any of the numbers I have already used.

Hi,

I'm not sure that I understand following issue.
Where have you added your SQL query? Please give me more detailed description of what you're doing.

lewisgr author 5/6/2009

Okay I found the answer to the date question it's:
"DATE_FORMAT(CurDate() ,'%Y-%m-01') = DateForUse"
Now I just to figure out how not to show the assigned numbers and that's in the table Orders_LineItems.