Jump to content

"Binary_file.dat" inserted into auto-increment field -- instead of a number


stevieontario

Recommended Posts

Afternoon Freaks,

 

I have been getting a weird INSERT query result. I put data into a table using the following query:

$cquery = "insert into performance2
							(sourceId, column1, column2, column3, column4)
							VALUES ('$lastSid', '$value1', '$value2', '$value3', '$value4')";
						mysql_query($cquery, $cxn);

 

The table performance2 contains an id field (perfid) which is an auto-incremented, indexed, primary key.

 

When I run that query, everything works -- except that all the perfid rows are filled with "binary_file.dat". I've never seen this before, and I've tried googling the problem and still can't find out what's going on.

 

Anybody have any ideas? Thanks!

If it's auto_increment, it has to be integer. If it's integer, it cannot hold value like 'binary_file.dat'. Please post table structure here (use 'SHOW CREATE TABLE performance2' query and paste results here).

Thanks Mchl, and sorry for the delay (computer problems related to office move).

 

Here's the table structure:

performance2 CREATE TABLE `performance2` (

`perfid` int(125) ...

 

Hope this helps,

 

Steve

1. INT(125) is nonsense.

2. I can't see it marked as AUTO_INCREMENT (perhaps you cut it off)

3. As said before, INT column cannot hold anything like 'binary_file.dat'. I'm not sure what to think about it. Where exactly do you see this?

As always, thanks for your time.

 

I did the "show create table performance2" query in phpMyAdmin, and just copied the results.

 

"Binary_file.dat" appears in each field in the perfid column when I click on the performance2 table in phpMyAdmin, in Browse mode.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.