Date: 06/21/02
- Next message: Michael Zornek: "[PHP-DB] how expensive is mysql_connect in performance"
- Previous message: brown: "[PHP-DB] [Q] EXT SQL IN PostgreSQL"
- Maybe in reply to: Matthew Nock: "[PHP-DB] Converting values from text to numerical"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Matt,
I think this might be the answer to your problem. It basically checks if
the string is an integer. I generally love the PHP automatic type
conversion, but sometimes it can trick ya.... :)
if (intval($val) == $val){
// integer stuff
} else {
// string stuff
}
Adam
> Hi Russ,
>
> thanks for the reply ... if that will evaluate whether a (in this
> case) a
> text string is an integer or not, then its exactly what I need! :)
>
> if it doesnt work, I will post a more detailed example to the list and
> see
> what we can come up with! :)
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Michael Zornek: "[PHP-DB] how expensive is mysql_connect in performance"
- Previous message: brown: "[PHP-DB] [Q] EXT SQL IN PostgreSQL"
- Maybe in reply to: Matthew Nock: "[PHP-DB] Converting values from text to numerical"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

