Re: [PHP-WIN] Bug??? "Duplicate entry '255' for key 1 " on auto increment

2007-05-21 Thread bedul
$query = "CREATE TABLE $table_name ( rowID INT(11) NOT NULL AUTO_INCREMENT, category VARCHAR(25) NOT NULL, trans_type VARCHAR(8) NOT NULL, PRIMARY KEY (rowID))"; try above.. thx to dale - Original Message - From: "Dale Attree" <[EMAIL PROTECTED]> To: "'Mark Abrams'" <[EMAIL PROTECTED]>;

RE: [PHP-WIN] Bug??? "Duplicate entry '255' for key 1 " on auto increment

2007-05-21 Thread Dale Attree
Set the length of rowID to 11, leave type as INT. -Original Message- From: Mark Abrams [mailto:[EMAIL PROTECTED] Sent: 22 May 2007 06:52 AM To: php-windows@lists.php.net Subject: [PHP-WIN] Bug??? "Duplicate entry '255' for key 1 " on auto increment Hi All, I have a table problem with "D

[PHP-WIN] Bug??? "Duplicate entry '255' for key 1 " on auto increment

2007-05-21 Thread Mark Abrams
Hi All, I have a table problem with "Duplicate entry '255' for key 1 " when any of my auto increment rowID fields reaches 255 I have installed PHP Version 5.1.2 and mySQL 5.0.11-beta on Win XP Pro. Each table in my DB that uses an auto increment for rowID fails at the 255th record insert. I ha

Re: [PHP-WIN] Dynamically update mysql field

2007-05-21 Thread bedul
u mean like this?? $id=mysql_result($result,$i,"ID"); while($temp = mysql_fetch_array($result)){ foreach($temp as $varNm =>$varVal){ $$varNm =$varVal; } /* put your table code here */ } ?> SOry just gues! - Original Message - From: "sam rumaizan" <[EMAIL PROTECTED]> To

[PHP-WIN] Dynamically update mysql field

2007-05-21 Thread sam rumaizan
I have Textarea generated by while loop. How can I name it to be able to use it with my mysql update statement? Scroll down to see it while($i<$num) { // collect all Information $id=mysql_result($result,$i,"ID"); $RefNo=mysql_result($result,$i,"Ref_No"); $JobTitle=mysql_result($result,

RE: [PHP-WIN] Textarea and mysql

2007-05-21 Thread Luis Moreira (ESI-GSQP)
Hi First, let me just say that "it does not work" is too vague. You should always describe the problem a little more. Anyway, there are a couple of things I don't understand on your script : $textareaSubmit = str_replace("\r", "",$textareaSubmit,$textarea2Submit);