Ok this might sound like a total newbie question, but I just want to clarify something that has been bugging me for a little while now.
I normally use single quotes in my code (Unless in use html content in my code) as this is slightly faster than double quotes (or so I have been lead to believe).
Now my question is this: which is safe to use:
$sql = sprintf( 'INSERT INTO %s ( ip, time ) VALUES ( %s, %u )', $this->table, $this->db->quoteString( $ip ), time() );
or
$sql = sprintf( "INSERT INTO %s ( ip, time ) VALUES ( %s, %u )", $this->table, $this->db->quoteString( $ip ), time() );
Or is the arguement a non starter as both are just as safe?
Your thoughts?
John








Bookmarks