I have a simple table:
describe chat_public_messageboard ;
+--------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------+------+-----+---------+----------------+
| message_id | int(100) | NO | PRI | NULL | auto_increment |
| message_from | varchar(255) | NO | | NULL | |
| message_to | varchar(20) | NO | | NULL | |
| message_body | tinytext | NO | | NULL | |
| message_time | varchar(50) | NO | | NULL | |
| welcome_msg | enum('0','1') | NO | | 0 | |
+--------------+---------------+------+-----+---------+----------------+
When I do an insert from the terminal, it works fine: select * 314 | sweety_margs | daffy | what did you say?
INSERT INTO chat_public_messageboard ( message_from , message_body , message_time , message_to , welcome_msg ) VALUES ( 'pdz' , 'what did you say?\n' , '1260948972' , 'pdz2' , 1 ) "
But when I send this exact query through the mysql db->query() function, the question mark turns to NULL
$query = $querystring = "INSERT INTO chat_public_messageboard ( message_from , message_body , message_time , message_to , welcome_msg ) VALUES ( 'pdz' , 'what did you say?\n' , '1260948972' , 'pdz2' , 1 ) " ;
db->query($querystring);
-
select *
314 | sweety_margs | daffy | what did you sayNULL
Thanks.