472,128 Members | 1,633 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,128 software developers and data experts.

UPDATE won't work

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

Sep 1 '06 #1
2 3143
"RioRanchoMan" <sa***@visitriorancho.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.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?
Sep 1 '06 #2
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.
Sep 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Randy Harris | last post: by
7 posts views Thread by Jean Christophe Avard | last post: by
20 posts views Thread by Mark Harrison | last post: by
5 posts views Thread by Slavan | last post: by
11 posts views Thread by SAL | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.