I'm trying to trouble shoot a friends script on his site. He's got two domains and the same script on both sites, he says the script works on one site but it doesn't update certain data to the database like the other site does. The one that has trouble updating has MySQL version 3.23.58 and the site that works fine has MySQL version 4.1.13 . What are the main programming differences between these two versions that would cause the database not to update. The code is hard to understand because its pages long and I didn't write it.
Yeah, I hear you on the confusing code. Even if you never think anyone else is going to see your code - it might be you three months from now and you'll have no idea what you did. Thus, one should code such that a kid could understand what was going on. Anyway, the UPDATE call has been around since the beginning, so I don't think its that - unless there's some crazy parameter that is new.....what's the code like?
Well the SQL text is like UPDATE this FROM that WHERE this occurs, there isn't any kind of backquotes or single quotes used (` or '), so thats where there may be a problem. The code looks like a big mess, every programmer needs to use comments.
I'm trying to trouble shoot a friends script on his site. He's got two domains and the same script on both sites, he says the script works on one site but it doesn't update certain data to the database like the other site does. The one that has trouble updating has MySQL version 3.23.58 and the site that works fine has MySQL version 4.1.13 . What are the main programming differences between these two versions that would cause the database not to update. The code is hard to understand because its pages long and I didn't write it.
If memory serves a big difference is sub queries never worked in the earlier version. Do you get any type of error return?
UPDATE table SET v='1', x='2', z='3' WHERE f='3' AND w='4' AND q='5' Make sure the syntax is correct. I use to think you needed SET AND AND AND, but its actually SET , , , .
I would hate to have to find the text in the code that I didn't write, its pages long. Besides MySQL doesn't return an error. It just doesn't update the data into the database. Doesn't make sense, what are the differences between the MySQL versions I mentioned above?
this some times cause also by the php versio you are using or the configuration of your server. may be cause by variables... sometimes this is the case... if the action script don't use the $_POST[] or $_GET[] try to use it.... for example: UPDATE mytable SET username = $_POST[username] WHERE username = $_POST[username] instead of UPDATE mytable SET username = $username WHERE username = $username
I don't think that has anything to do with it because the data is created dynamically from a calculation from another number which updates fine to another table on the database. Also the php version is like .01 off its almost identical. What are the differences in the two MySQL versions I mentioned above?
well if you could give as an snipet of the code maybe we can help you to solve the problem. It's hard to guess what really the problem is.
please do not tell a problem without a code. Because we can't help you this way. Or you should think about it by just staring at a code like me, and it'll come to you.
might help if you were to post some example error codes generated on the site pointing to the 3.23.58 build... otherwise you could look at the build history on the mysql site, there are too many differences to list easily. better to look at the symptom first. VG
There aren't any error codes, just doesn't update the information to the database. Also I tried looking for that site your talking about that would list the differences between the two MySQL versions, I couldn't find it.
version changes between 3.x and 4.x can be found here: http://dev.mysql.com/doc/refman/4.1/en/news.html
Its not my script so don't critisize it. Its supposed to take the Account Credits and calculate the earnings and update them to the database, but it doesn't do that. The script is attached.
Thanks for the site VectorGraphX, what does this mean? Anyone? Fixed security problem where mysqld didn't allow one to UPDATE rows in a table even if one had a global UPDATE privilege and a database SELECT privilege.