It's worth a try. I have no idea what sets is_show or where else it might be used; this isn't my code.Rovch wrote:Actually you're right, however what initially changes 'is_show' in the table?
Can I completely get rid of 'is_show' and use something like:
And hopefully not change anything else.Code: Select all
$month = $date("n"); return $db->query("SELECT DISTINCT month_id from travel WHERE month_id=".$month." ORDER BY 1 ".($parms['start'] == 12 ? 'DESC' : '')." ".$limit);
Need help with array
Moderator: General Moderators
Re: Need help with array
Re: Need help with array
That should work assuming $date is a DateTime object.Rovch wrote:For some reason I can't get PHP to identify month number like this:Code: Select all
date_format($date, "n")
Rovch wrote:Also, how would I go about getting two months instead of one out of this? So far I can only get one month to output properly.Code: Select all
return $db->query("SELECT DISTINCT month_id from travel WHERE month_id=".$month." ORDER BY 1 ".($parms['start'] == 12 ? 'DESC' : '')." ".$limit);
Code: Select all
return $db->query("SELECT DISTINCT month_id from travel WHERE month_id >= ".$month." ORDER BY 1 ".($parms['start'] == 12 ? 'DESC' : '')." ".$limit);Re: Need help with array
Celauran, thanks a lot for help. But I ended up writing my own code.
See, somehow 'is_show' is an algorithm that edits itself and shows three proper links.
Although each month has three. table only holds 24.. I am just going to end up bumping that up to 36.
It's too risky to mess with that class because I don't know if anything else relies on it.
Thanks a lot for help tho.
See, somehow 'is_show' is an algorithm that edits itself and shows three proper links.
Although each month has three. table only holds 24.. I am just going to end up bumping that up to 36.
It's too risky to mess with that class because I don't know if anything else relies on it.
Thanks a lot for help tho.