To quote or not to quote?

From: Date: Mon, 09 Oct 2000 17:36:36 +0000
Subject: To quote or not to quote?
Groups: php.db 
Request: Send a blank email to php-db+get-3437@lists.php.net to get a copy of this message
I guess this is mostly a MySQL question, but perhaps PHP has a solution... I would like a foolproof way to determine whether a data value needs to be quoted. Numeric data doesn't need quotes, but string data does. I could use mysql_field_type and check if it's integer, float, double, real, etc., but this seems fragile. I could easily miss one, or a new version of MySQL could add a new one. So how can I get the equivalent of a "mysql_needs_quotes" function? -- Patrick Doyle doylep@eecg.utoronto.ca

« previous php.db (#3437) next »