Results 1 to 3 of 3
May 30, 2013, 12:39 #1
Bizarre problem with MySQL Update not working via Php
I am having a really bizarre problem!
That is I am updating a series of MySQL fields via Php While Loop.
However the 1st row is getting Updated but the other rows are not getting Updated regarding the MySQL Update, but they are getting executed regarding all other commands in the Loop!
And I have checked the MySQL Update commands, they are fine as they execute fine inside MySQL.
What could be causing this!!!!
In case, I have gone ahead and printed out a few lines of the Loop, printing out the MySQL Update command and following action in that Loop.
(1): UPDATE pap SET cc_number = '5424*******9191' WHERE id = 4156 AND user_id = 705| INSERTed cc_rem: 18082153
(2): UPDATE pap SET cc_number = '4388*******1002' WHERE id = 4157 AND user_id = 705| INSERTed cc_rem: 57602872
(3): UPDATE pap SET cc_number = '4388*******1002' WHERE id = 4168 AND user_id = 664| INSERTed cc_rem: 57602872
What in GODs name could be causing only the 1st MySQL Update to run and not others in the While Loop?
May 30, 2013, 12:43 #2
- Join Date
- May 2007
- Poole, UK
- 101 Post(s)
- 0 Thread(s)
May 30, 2013, 13:27 #3
SpacePhoenix, I already figured what the problem was.
A function in the While Loop was connecting to another MySQL DB on another Server so when the Loop continued then the MySQL commands to execute on the 1st server were not being executed!
Unbelievable, wasted a day of my time
You know, MySQL should give an Error message when one is trying to execute a Query whose Table does not exist DB Connection X!
Thank anyway man.