"Adam Williams" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, I have a variable that is created using the date command: > > $date = date("Ymd"); > > but its not working in my database this way (when I explicity enter > 20040614 in my database, it works though). so I think PHP is making $date > a character variable, so how can I force or change the caste of $date to > force it to be an integer variable? thanks
Try this: $date = (int) $date; See here: http://de2.php.net/language.types.type-juggling But it should also work as a PHP string with your DB. Could you post your INSERT/UPDATE statement? Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php