robert_gsfame Posted April 27, 2010 Share Posted April 27, 2010 I have this mysql_query(sprintf("UPDATE TABLE1 SET photo=NULL WHERE username='%s'", mysql_real_escape_string($session))); then i didnt find NULL value inside the photo column, only blank ???really confused Link to comment https://forums.phpfreaks.com/topic/199874-still-problem-with-mysql_real_escape_string/ Share on other sites More sharing options...
greatstar00 Posted April 27, 2010 Share Posted April 27, 2010 NULL is blank, the ascii value of 0 (not a printable character, printable character is from 32 to 126, inclusive), anything beyond 128, is used for the purpose of other language if u want it to be the text NULL do this UPDATE TABLE1 SET photo="NULL" WHERE username='%s Another thing, depends what software u using, they might have different way of displaying NULL (the ascii 0) some display NULL (with some background color), like the mysql official GUI tool Link to comment https://forums.phpfreaks.com/topic/199874-still-problem-with-mysql_real_escape_string/#findComment-1049115 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.