473,320 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 3185
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MAS | last post by:
Below is a simple UPDATE that I have to perform on a table that has about 2.5 million rows (about 4 million in production) This query runs for an enourmous amount of time (over 1 hour). Both the...
2
by: hch | last post by:
dataAdapter.Update(data, "TableName") won’t work! I was about to deploy my first website on the Internet only to discover that the dataAdapter.Update() throws the Server Error in the third...
33
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and...
10
by: Randy Harris | last post by:
I imported records into a table, later found out that many of them had trailing spaces in one of the fields. If I'd caught it sooner, I could have trimmed the spaces before the import. This...
7
by: Jean Christophe Avard | last post by:
Hi! I have a dataset that retreive all the item information from the database. I need to be able to edit them, in the dataset and in the database. I have this code, could anyone tell me if I'm...
20
by: Mark Harrison | last post by:
So I have some data that I want to put into a table. If the row already exists (as defined by the primary key), I would like to update the row. Otherwise, I would like to insert the row. I've...
5
by: Slavan | last post by:
I have an update statement that I'm executing against Oracle database from my C# code and it won't work. UPDATE MenuCaptions SET Caption = N@Caption WHERE MenuId = @MenuId AND CultureId =...
11
by: SAL | last post by:
Hello, I have a Gridview control (.net 2.0) that I'm having trouble getting the Update button to fire any kind of event or preforming the update. The datatable is based on a join so I don't know...
1
beacon
by: beacon | last post by:
Hi everybody, I have an Employee table with the following: Table - Employee -------------------------- ID: AutoNum, PK FName: Text LName: Text Status: Yes/No
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.