Page 1 of 1

[SOLVED]Stumped!

Posted: Sat Jun 26, 2010 12:09 pm
by radium35
using the exact same syntax to connect to mysql and it does not dump the data???@#$ WTF i checked every over 10 thousand times i dont even get php errors :banghead:

Code: Select all

<? $db = mysql_connect('localhost', 'user', 'pass');
    
mysql_select_db('mcp', $db) or die('Could not select database.');
    
mysql_query("INSERT INTO agreement (id,   first,   
									 last,                                    
									 addy, 
									 pp,
									 deadline, 
									 desc, 
									 menu_items, 
									 email, 
									 ip, 
									 date, 
									 agree_status
									 ) 
									 VALUES 
									 ('', 
									 'value',
									 'value',
									 'value',
									 'value',
									 'value', 
									 'value', 
									 'value',
									 'value',
									 'value',
									 'value', 
									 'value')");
                                     
									  mysql_close($db);




?>

Code: Select all

CREATE TABLE `agreement` (
  `id` int(10) NOT NULL auto_increment,
  `first` varchar(35) NOT NULL,
  `last` varchar(35) NOT NULL,
  `addy` varchar(45) NOT NULL,
  `pp` varchar(25) NOT NULL,
  `deadline` varchar(25) NOT NULL,
  `desc` longtext NOT NULL,
  `menu_items` varchar(100) NOT NULL,
  `email` varchar(35) NOT NULL,
  `ip` varchar(15) NOT NULL,
  `date` varchar(20) NOT NULL,
  `agree_status` varchar(5) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;

Re: Stumped!

Posted: Sat Jun 26, 2010 2:02 pm
by requinix
"desc" is a reserved word and "date" is a built-in function. If you want to use those names you need to quote them.

And you aren't getting any errors because you aren't asking for them.

Re: Stumped!

Posted: Sat Jun 26, 2010 2:07 pm
by radium35
i should thanks in advance then do 'desc'

Re: Stumped!

Posted: Sat Jun 26, 2010 3:33 pm
by radium35
Thanks! removed desc and all works great!!!!!!!!!!!!!1111 :D

tasairis wrote:"desc" is a reserved word and "date" is a built-in function. If you want to use those names you need to quote them.

And you aren't getting any errors because you aren't asking for them.