--- Lenny Davila <[EMAIL PROTECTED]> wrote:

> it works fine like this:
> 
> echo myCount('bands','1','type','promoter','=','Promoters');
> 
> but this will not:
> 
> $theDate = date("Ymd");
> 
> echo myCount('calendar','1','mydate','$theDate','>=','Events');
> 
> the sql statement comes out like this:
> 
> SELECT COUNT(*) FROM `calendar` WHERE `mydate` >= '$theDate'
> 
> Can someone please let me know what I am doing wrong?

As you have noticed, the value you have passed has not evaluated the variable. 
This is what you would expect since you surrounded the variable name in single
quotes (also known as strong quotes).  If you used double quotes or no quotes
at all in the function call, it should work as expected.

James Keeline




Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php-list/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to