0
Explorer
,
/t5/dreamweaver-discussions/can-you-use-a-php-variable-to-filter-a-recordset/td-p/593628
Apr 02, 2007
Apr 02, 2007
Copy link to clipboard
Copied
I've got a table of 'events', which have a description and
more importantly for this a month ID number. (1-12 for the months
of the year, when the event takes place) .
I've used php's date function on a page to fund out numerically what month it is now $thismonth = date("n");
i want to filter my recordset by only bringing up events that take place during the current month so where event_month = $thismonth
IS this possible? It seems like it should be easy to do but I can't get it to work.
Thanks in advance
Dave
I've used php's date function on a page to fund out numerically what month it is now $thismonth = date("n");
i want to filter my recordset by only bringing up events that take place during the current month so where event_month = $thismonth
IS this possible? It seems like it should be easy to do but I can't get it to work.
Thanks in advance
Dave
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
LEGEND
,
Apr 02, 2007
Apr 02, 2007
jnkjnkjnkjnkjn wrote:
> i want to filter my recordset by only bringing up events that take place
> during the current month so where event_month = $thismonth
>
> IS this possible? It seems like it should be easy to do but I can't get it to
> work.
Yes, it's very easy, but you need to do a little hand-coding. In the
Advanced recordset dialog box set the end of the SQL query to WHERE
event_month = 1. When you have saved the recordset, change the SQL to
WHERE event_month = $thismonth.
--
...
> i want to filter my recordset by only bringing up events that take place
> during the current month so where event_month = $thismonth
>
> IS this possible? It seems like it should be easy to do but I can't get it to
> work.
Yes, it's very easy, but you need to do a little hand-coding. In the
Advanced recordset dialog box set the end of the SQL query to WHERE
event_month = 1. When you have saved the recordset, change the SQL to
WHERE event_month = $thismonth.
--
...
LEGEND
,
/t5/dreamweaver-discussions/can-you-use-a-php-variable-to-filter-a-recordset/m-p/593629#M143463
Apr 02, 2007
Apr 02, 2007
Copy link to clipboard
Copied
jnkjnkjnkjnkjn wrote:
> i want to filter my recordset by only bringing up events that take place
> during the current month so where event_month = $thismonth
>
> IS this possible? It seems like it should be easy to do but I can't get it to
> work.
Yes, it's very easy, but you need to do a little hand-coding. In the
Advanced recordset dialog box set the end of the SQL query to WHERE
event_month = 1. When you have saved the recordset, change the SQL to
WHERE event_month = $thismonth.
--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
> i want to filter my recordset by only bringing up events that take place
> during the current month so where event_month = $thismonth
>
> IS this possible? It seems like it should be easy to do but I can't get it to
> work.
Yes, it's very easy, but you need to do a little hand-coding. In the
Advanced recordset dialog box set the end of the SQL query to WHERE
event_month = 1. When you have saved the recordset, change the SQL to
WHERE event_month = $thismonth.
--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
jnkjnkjnkjnkjn
AUTHOR
Explorer
,
LATEST
/t5/dreamweaver-discussions/can-you-use-a-php-variable-to-filter-a-recordset/m-p/593630#M143464
Apr 03, 2007
Apr 03, 2007
Copy link to clipboard
Copied
brilliant, thanks
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

