Click here to get back home

UPDATE won't work

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
UPDATE won't work RioRanchoMan 09-01-2006
Get Chitika Premium
Posted by RioRanchoMan on September 1, 2006, 4:14 pm
Please log in for more thread options
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


Posted by Jim Langston on September 1, 2006, 4:30 pm
Please log in for more thread options
> 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?



Posted by RioRanchoMan on September 3, 2006, 10:29 pm
Please log in for more thread options
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.


Similar ThreadsPosted
Does SSL really work in mysql 4.0.21? June 16, 2006, 3:06 am
Making ODBC work August 2, 2005, 2:16 pm
UNION und ORDER BY in 4.1.12 don't seem to work July 12, 2005, 10:12 am
How does a MySQL "AND" work? (sub-searches)? November 4, 2005, 12:57 am
does "LOAD DATA" EVER work?!? I've tried EVERYTHING! November 22, 2005, 9:43 am
Foreign Keys Don't Work? April 18, 2006, 6:29 am
Having problem getting group by to work with order by October 19, 2005, 8:40 pm
Problems trying to get MySQL to work from PHP script December 5, 2005, 3:00 pm
mysql dump doesn't work anymore May 5, 2006, 1:16 pm
MySQL / PHPMyAdmin import from Access; txt's don't work! June 17, 2006, 7:49 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap