Forums
This topic is locked
Date Help
Posted 04 Jan 2002 00:24:54
1
has voted
04 Jan 2002 00:24:54 Paul Gowder posted:
In UltraDev, how can I do a query to pull results based on matching a month field to the current date??Replies
Replied 04 Jan 2002 00:28:32
04 Jan 2002 00:28:32 Paul Gowder replied:
I'm using Phakt with php and mysql.
Thanks
Thanks
Replied 04 Jan 2002 02:18:35
04 Jan 2002 02:18:35 Tim Green replied:
Try something along these lines:-
<?php
$Recordset1__MMColParam = "-1";
if (isset($month))
{$Recordset1__MMColParam = $month;}
?>
<?php
$Recordset1_MMColParam = date("m",time());
?>
<?php
$Recordset1=$connCart->Execute("SELECT * FROM orders WHERE month = '" . ($Recordset1__MMColParam) . "'" or DIE($connCart->ErrorMsg());
$Recordset1_numRows=0;
$Recordset1__totalRows=$Recordset1->RecordCount();
?>
Hope this helps
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
<?php
$Recordset1__MMColParam = "-1";
if (isset($month))
{$Recordset1__MMColParam = $month;}
?>
<?php
$Recordset1_MMColParam = date("m",time());
?>
<?php
$Recordset1=$connCart->Execute("SELECT * FROM orders WHERE month = '" . ($Recordset1__MMColParam) . "'" or DIE($connCart->ErrorMsg());
$Recordset1_numRows=0;
$Recordset1__totalRows=$Recordset1->RecordCount();
?>
Hope this helps
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>