error in insert function

From: Date: Mon, 19 May 2003 13:07:48 +0000
Subject: error in insert function
Groups: php.windows 
Request: Send a blank email to php-windows+get-20000@lists.php.net to get a copy of this message
Hi I'M stuck Can anyone help. I'm trying to call a function : $lev_date = '190303'; add_menu_db($location,$lev_date,$wm_id,$payroll_no,$order_menu[0]['text'],$o rder_menu[0]['price'],$amount); The function : function add_menu_db($loc_no,$lev_date,$wm_id,$payroll_no,$line_text,$price,$amount) { global $db1; $q = " INSERT INTO invoice (loc_id, lev_date, wm_id, payroll_no, line_text, price, amount) VALUES ($loc_id, '$lev_date', '$wm_id', $payroll_no, '$line_text', $price, $amount) "; mysql_query($q,$db1) or die ("ERROR IN - add_menu_db function"); } I get a error but it works if in a promt writes : INSERT INTO invoice (loc_id, lev_date, wm_id, payroll_no, line_text, price, amount) VALUES (1, "190303", "wmtester", 19999, "text", 10 ,2) CAN ANYONE HELP ?????????+ _____________________________ Anders Mikkelsen A. Mikkelsen Telefon +45 21717224 mailto:am@amikkelsen.com

« previous php.windows (#20000) next »