UPDATE won"t work
am 01.09.2006 22:14:42 von RioRanchoMan
When adding a new record in my forum, if the new thread is the parent
thread, the Parent_Ancestor takes on the record ID (field called
Forum). For some reason, new threads are not inheriting the record ID,
but always receive the number 65535 in its place.
When I try to update a field in a record through PHPMyAdmin, the query
executes, but the record isn't actually updated. Here's my update
statement:
UPDATE `Forum` SET `Forum_Ancestor` = '66901' WHERE `Forum` = '66901'
LIMIT 1 ;
I want the Forum_Ancestor to be the same as the record ID. But, when I
check the record it is still 65535 (which is an erroneous number
anyway).
Is there any significance to the number 65535? Why won't the record
update?
Thanks in advance
Re: UPDATE won"t work
am 01.09.2006 22:30:55 von Jim Langston
"RioRanchoMan" wrote in message
news:1157141682.257446.300650@b28g2000cwb.googlegroups.com.. .
> When adding a new record in my forum, if the new thread is the parent
> thread, the Parent_Ancestor takes on the record ID (field called
> Forum). For some reason, new threads are not inheriting the record ID,
> but always receive the number 65535 in its place.
>
> When I try to update a field in a record through PHPMyAdmin, the query
> executes, but the record isn't actually updated. Here's my update
> statement:
>
> UPDATE `Forum` SET `Forum_Ancestor` = '66901' WHERE `Forum` = '66901'
> LIMIT 1 ;
Don't see table name.
>
> I want the Forum_Ancestor to be the same as the record ID. But, when I
> check the record it is still 65535 (which is an erroneous number
> anyway).
>
> Is there any significance to the number 65535? Why won't the record
> update?
>
> Thanks in advance
65535 is a short (2 byte) interger with all the bits set. The largest
unsigned short.
Try something like:
select 'Forum_Ancestor' from mydb.mytable where 'Forum' = '66901';
Do you get anything returned?
Re: UPDATE won"t work
am 04.09.2006 04:29:40 von RioRanchoMan
Your post held the key to my getting my forums back up again. Thanks!
I had the Forum_Parent field set to tinyint(5), which didn't allow any
ID's higher than 65535 to be set in Forum_Parent field. Once I set the
field to a MEDIUMINT(8), I had no problem.
Whew! What a great help you have been. Thanks again!
Your key to my success:
> 65535 is a short (2 byte) interger with all the bits set. The largest
> unsigned short.