Jump to content

Archived

This topic is now archived and is closed to further replies.

AV1611

simple question...

Recommended Posts

I need to change this to ROHS_PROCESS on or after a date...

 

SELECT * FROM lbryperm

WHERE TEK_PART_NUMBER

LIKE '$PartNo'

and

ROHS_PROCESS LIKE 'yes'

 

Sorry to be such a noob... Dates always mess me up

Share this post


Link to post
Share on other sites
I need to change this to ROHS_PROCESS on or after a date...

 

Please clarify... I'm confused.

Share this post


Link to post
Share on other sites

Currently, the field ROHS_PROCESS contains YES or NO. We are going to change it to a date so we can plan on when the flag is set, in stead of it being manually set...

 

I need the query to display on or after a date instead of the YES this it currently displays by...

 

Please clarify... I'm confused.

300113[/snapback]

 

 

 

Share this post


Link to post
Share on other sites
I need to change this to ROHS_PROCESS on or after a date...

 

SELECT * FROM lbryperm

WHERE TEK_PART_NUMBER

LIKE '$PartNo'

and

ROHS_PROCESS LIKE 'yes'

 

Sorry to be such a noob... Dates always mess me up

300110[/snapback]

 

i would think you could simply do:

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]

[span style=\"color:#0000BB\"]<?php

$sql [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM lbryperm WHERE TEK_PART_NUMBER LIKE \'$PartNo\' AND ROHS_PROCESS >= \'\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]date[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\'Y-m-d\'[/span][span style=\"color:#007700\"]) . [/span][span style=\"color:#DD0000\"]\"\'\"[/span][span style=\"color:#007700\"];

[/span][span style=\"color:#0000BB\"]?>

[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

 

this fills in the SQL format of the DATE field with todays date.

Share this post


Link to post
Share on other sites

Wouldn't that always return TRUE because you are comparing to todays date, not the date in the record?

 

I was thinking the answer would be:

 

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]

[span style=\"color:#0000BB\"]<?php

$sql [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM lbryperm WHERE TEK_PART_NUMBER LIKE \'$PartNo\' AND ROHS_PROCESS >= \"[/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'DATE\'[/span][span style=\"color:#007700\"]][/span][span style=\"color:#DD0000\"]\";

?>[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

 

Would that be right?

 

i would think you could simply do:

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]

[span style=\\\"color:#0000BB\\\"]<?php

$sql [/span][span style=\\\"color:#007700\\\"]= [/span][span style=\\\"color:#DD0000\\\"]\\\"SELECT * FROM lbryperm WHERE TEK_PART_NUMBER LIKE \'$PartNo\' AND ROHS_PROCESS >= \'\\\" [/span][span style=\\\"color:#007700\\\"]. [/span][span style=\\\"color:#0000BB\\\"]date[/span][span style=\\\"color:#007700\\\"]([/span][span style=\\\"color:#DD0000\\\"]\'Y-m-d\'[/span][span style=\\\"color:#007700\\\"]) . [/span][span style=\\\"color:#DD0000\\\"]\\\"\'\\\"[/span][span style=\\\"color:#007700\\\"];

[/span][span style=\\\"color:#0000BB\\\"]?>[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

 

this fills in the SQL format of the DATE field with todays date.

300135[/snapback]

 

Share this post


Link to post
Share on other sites
Wouldn't that always return TRUE because you are comparing to todays date, not the date in the record?

 

I was thinking the answer would be:

 

[!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--]

[span style=\\\"color:#0000BB\\\"]<?php

$Date[/span][span style=\\\"color:#007700\\\"]=[/span][span style=\\\"color:#0000BB\\\"]$_POST[/span][span style=\\\"color:#007700\\\"][[/span][span style=\\\"color:#DD0000\\\"]\'DATE\'[/span][span style=\\\"color:#007700\\\"]];

[/span][span style=\\\"color:#0000BB\\\"]$sql [/span][span style=\\\"color:#007700\\\"]= [/span][span style=\\\"color:#DD0000\\\"]\\\"SELECT * FROM lbryperm WHERE TEK_PART_NUMBER LIKE \'$PartNo\' AND ROHS_PROCESS >= \'$DATE\';

?>[/span]

[/span][!--PHP-Foot--][/div][!--PHP-EFoot--]

 

Would that be right?

300163[/snapback]

Share this post


Link to post
Share on other sites
Would that be right?

300163[/snapback]

 

yes, i was just doing that for example... sorry, i should have stuck with what you requested ;-)

 

good luck

Share this post


Link to post
Share on other sites

Sorry, I have a habbit of answering my own question after I post them... I guess it's easier to see on the forum than in my text editor LOL

yes, i was just doing that for example... sorry, i should have stuck with what you requested ;-)

 

good luck

300168[/snapback]

 

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.