>When running a mysql_query, sometimes i need to have apostrophes >surrounding variables...other times i don't > >example... > >$query = "SELECT * FROM table WHERE id='$id'"; > >or > >$query = "SELECT * FROM table WHERE id=$id"; > >...it kinda seems random when it wants apostrophes and when it doesn't >want them.
You do not need apostrophes on INTEGER and FLOAT data. Everything else needs them. In fact, other SQL engines will complain if you put apostrophes on the numeric data. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php