User Profile
Collapse
-
ill give those a go now and report back. cheers for the help so far! -
Great that makes sense.
Ok so what now if @month = 0. In that case I dont want MONTH(tickets_1 .ticketsStartDa te) in the Having statement.
Would i need to wrap that statement in an IF?Leave a comment:
-
Conditional Having Statement
Hey Guys,
I have a huge statement loads of if statements in... and its getting bigger.
On closer inspection there is only 3 difference in the select statement. so I thought I could cut the whole thing down to just 1 select statement if I have a conditional Having.
I've simplified the IF statement down a bit to give you an idea of what im trying to achieve
Code:IF @month <> 0 &
-
Thanks for the help so far.
Below is the code i run;
Code:$eventsDetail = $detail->eventsGetTheatreDates($itemID,0,0); print_r($eventsDetail);
Code:public function eventsGetTheatreDates($itemID,$month,$year){ global $db; $rs = $db->databaseQuery('exec eventsGetTheatreDates '.$itemID.','.$month.','.$year);
Leave a comment:
-
Php output differnt than MSSQL
Hey, I have a really confusing problem here.
I'm using MSSQL & PHP. I have created a querry in MSSQL that basically shows a list of events and shows them in date order. I have written a bit of code into the mssql statement that says 'If the current date is the friday before the event date, and the event date is on a saturday or sunday, then dont show that event'
when I run that code in mssql it returns the correct...
No activity results to display
Show More
Leave a comment: