ID: 10394
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: MySQL related
Description: mysql_query() dosen't stable!



Previous Comments:
---------------------------------------------------------------------------

[2001-04-19 05:55:43] [EMAIL PROTECTED]
Hi,
I have a table:
CREATE TABLE boardlist (
   board_id int(11) DEFAULT '0' NOT NULL,
   header_inc mediumtext NOT NULL,
   footer_inc mediumtext NOT NULL,
   board_width varchar(10) NOT NULL,
   board_align varchar(10) NOT NULL,
   name varchar(50) NOT NULL,
   description varchar(255) NOT NULL,
   admin varchar(20) NOT NULL,
   password varchar(20) NOT NULL,
   email varchar(50) NOT NULL,
   mail_reply tinyint(4) DEFAULT '0' NOT NULL,
   color1 varchar(20) NOT NULL,
   color2 varchar(20) NOT NULL,
   color3 varchar(20) NOT NULL,
   color4 varchar(20) NOT NULL,
   color5 varchar(20) NOT NULL,
   img_id tinyint(4) DEFAULT '0' NOT NULL,
   btn_id tinyint(4) DEFAULT '0' NOT NULL,
   rows tinyint(4) DEFAULT '10' NOT NULL,
   pages tinyint(4) DEFAULT '10' NOT NULL,
   image_path1 varchar(50) NOT NULL,
   image_path2 varchar(50) NOT NULL,
   image_path3 varchar(50) NOT NULL,
   id_check tinyint(4) DEFAULT '0' NOT NULL,
   writer_check tinyint(4) DEFAULT '0' NOT NULL,
   date_check tinyint(4) DEFAULT '0' NOT NULL,
   point_check tinyint(4) DEFAULT '0' NOT NULL,
   counter_check tinyint(4) DEFAULT '0' NOT NULL,
   image_check tinyint(4) DEFAULT '0' NOT NULL,
   text_check tinyint(4) DEFAULT '0' NOT NULL,
   color_check tinyint(4) DEFAULT '0' NOT NULL,
   bg_image_check tinyint(4) DEFAULT '0' NOT NULL,
   bg_color_check tinyint(4) DEFAULT '0' NOT NULL,
   usertype tinyint(4) DEFAULT '0' NOT NULL,
   write_check tinyint(4) DEFAULT '0' NOT NULL,
   update_check tinyint(4) DEFAULT '0' NOT NULL,
   delete_check tinyint(4) DEFAULT '0' NOT NULL,
   reply_check tinyint(4) DEFAULT '0' NOT NULL,
   upload_check tinyint(4) DEFAULT '0' NOT NULL,
   PRIMARY KEY (board_id)
);
------------
and use:
$board_id=2;
$sql="insert boardlist(board_id, header_inc, footer_inc, board_width, board_align, 
name, description, admin, password, email, mail_reply, color1, color2, color3, color4, 
color5, img_id, btn_id, rows, pages, image_path1, image_path2, image_path3, id_check, 
writer_check, date_check, point_check, counter_check, image_check, text_check, 
color_check, bg_image_check, bg_color_check, usertype,write_check, update_check, 
delete_check, reply_check, upload_check) values('$board_id', '', '', '80%', 'left', 
'Board', 'Board', 'admin', '1323', '', '0', '#7DA7D9', '#E1E1FA', '#FFFFFF', 
'#D0D0FC', '#D0D0FC', '1', '1', '10', 
'10','http://user.chollian.net/~dawn0121/icon.htm', '', '', '1', '1', '1', '1', '1', 
'1', '1', '1', '1', '1', '0', '1', '1', '1', '1', '1');";
                //$sql="insert into boardlist(board_id) values(".$board_id.")";
                mysql_query($sql) or die(mysql_error()."<br>sql==".$sql);
                echo $sql;
------------------
Sometime it works (inserts ok) but sometime doesn't (without notice an error!).
When it doesn't, I copy the sql statement from echo $sql result, paste into mysql 
command line,and run, but it always works!!

---------------------------------------------------------------------------


Full Bug description available at: http://bugs.php.net/?id=10394


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to