[pmwiki-users] SelectQuery question

Dave Brockman daveb at oz.net
Thu Oct 9 02:11:55 CDT 2008


Dave Brockman wrote:
> I installed SelectQuery and it works fine. Thank you very much! But, I 
> was wondering if there is a way to use page variables in the query? I'm 
> just starting with MySQL and know very little about it. I didn't make 
> the database I am accessing. Here's what I would like to do:
> 
> (:selectquery columns="first_name,last_name,YEAR(death_date)" 
> tables=actor where="MONTH(death_date) = $CurrentMonth AND 
> DAYOFMONTH(death_date) = $CurrentDay":)
> 
> This works fine if $CurrentMonth and $CurrentDay are replaced with 
> numbers. I added those page variables to config.php per the 
> MoreCustomPageVariables recipe. They work in {normal} usage.
> 
> Is there a way to make this work? Thanks in advance!
> 
> Dave

Oops! Never mind. Problem solved. {CurrentMonth} {CurrentDay} Tried that 
before, but I must have had something else messed up. Sorry! Thanks!

Dave




More information about the pmwiki-users mailing list