mysql

Talk about anything to do with making sites or running Servers.
Post Reply
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

ok, i got a problem

i got 2 servers, 1 windows, 1 linux
both have an identical table

id smallint(5) NOT NULL AUTO_INCREMENT, primary key (id)

on the linux one i can do
insert into table values ('NULL'); and it will work and add the correct number

but on the windows server, i get an error

<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
ADDKiD
&lt;3 bd long time
Posts: 967
Joined: Tue Jul 12, 2005 8:07 pm
Location: Washington, USA
Contact:

Post by ADDKiD »

What version of Windows? Windows 2003? What error, I bet you its the same one I was getting x.x
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

its xp and redhat
both mysql 5.0
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
ADDKiD
&lt;3 bd long time
Posts: 967
Joined: Tue Jul 12, 2005 8:07 pm
Location: Washington, USA
Contact:

Post by ADDKiD »

I'll talk to my Network Administrator Friend, and see what he says. He's pretty good with MySQL, and MSSQL. What's the exact Error?
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

# 1366
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

insert into table values ('NULL');

try inserting '' or better yet, not inserting anything at all on it. Just leave that field out on the insert and it should work.
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

bone-you wrote: insert into table values ('NULL');

try inserting '' or better yet, not inserting anything at all on it. Just leave that field out on the insert and it should work.
hmm, ill give that a try tomarrow
but what i wanna know is why it would work on linux but not windows?
(ive tried it 2 different linux machines and both worked fine)
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

binarydata wrote:
bone-you wrote: insert into table values ('NULL');

try inserting '' or better yet, not inserting anything at all on it. Just leave that field out on the insert and it should work.
hmm, ill give that a try tomarrow
but what i wanna know is why it would work on linux but not windows?
(ive tried it 2 different linux machines and both worked fine)
I'm thinking it might be a programming error. The windows vs linux ports of the applications. Not everything is exactly the same. Maybe someone made a messup somewhere? The '' or not specifying it should work. Even on windows.
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

hmm, im thinkin there some var on the windows machine i need to change/set?
i doubt its a coding error cause im runnign these queries in mysql

ill find out when i go into work later
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

I know this gimme 5 minutes so i find what i did to fix it its something about Strict mode being on the server
-><-
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

Open my.ini in your mysql root
search for
# Set the SQL mode to strict

on the next line i have
sql-mode=""

i forget what it was durring the install probally one of these
STRICT_TRANS_TABLES
STRICT_ALL_TABLES

hope that helps
-><-
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

Jensen wrote: Open my.ini in your mysql root
search for
# Set the SQL mode to strict

on the next line i have
sql-mode=""

i forget what it was durring the install probally one of these
STRICT_TRANS_TABLES
STRICT_ALL_TABLES

hope that helps
ah, that was it
just had to get rid of STRICT_TRANS_TABLES in sql mode
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

Yeah I ran into that when upgrading to 5.0.X on my windows servers, glad I could help
-><-
Post Reply