FUDforum - خوراک RDF
http://fudforum.org/forum/index.php
Zero values in fields
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=19820&th=4106#msg_19820
I got a relatively simple problem I guess but I can't figure it out for the life of me.
The deal is that I have zeroes in the fields of a table and when I do a query for those fields the values passed to the PHP variables are empty instead of having a zero in them.
Anyone got an idea about what I can do?
-Abraxa]]>Abraxa2004-09-07T00:50:26-00:00Re: Zero values in fields
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=19823&th=4106#msg_19823
What are the types of the fields? Int? Varchar?
If you wanna get the 0 back, they have to be Int or a Varchar where the "string" 0 is in.]]>dataj19982004-09-07T12:15:36-00:00Re: Zero values in fields
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=19839&th=4106#msg_19839
I fiddled around with MySQL and set the field properties of that column to NOT NULL and lowered the length of the length field (at least I think that's all I did, it was a couple days ago).
I just checked again and to my surprise the query does return the zero values now...
Could it have been the NOT NULL option? Sorry, I'm a beginner in MySQL and couldn't find anything about the exact behavior of that option in the MySQL documentation =\
-Soeren]]>Abraxa2004-09-11T01:49:59-00:00Re: Zero values in fields
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=19842&th=4106#msg_19842
If a field is defined to be not null, you should always get a value back. But please be careful: You should set a default value for that field. If you insert a record and leave out a field with the option set and you don't have a default value, your insert will fail.]]>dataj19982004-09-12T14:32:48-00:00Re: Zero values in fields
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=19845&th=4106#msg_19845
People like you are who make coding worthwhile and fun - cause you saved me lots of time figuring out why my INSERTs wouldn't o through cause I unknowingly had the exact problem in my table that you made me aware of =D
-Soeren]]>Abraxa2004-09-12T19:36:44-00:00Re: Zero values in fields
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=19848&th=4106#msg_19848
dataj19982004-09-12T21:37:41-00:00Re: Zero values in fields
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=20217&th=4106#msg_20217
alansmith2004-10-03T10:50:06-00:00Re: Zero values in fields
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=20229&th=4106#msg_20229
Ilia2004-10-04T13:17:29-00:00