d11wtq wrote:Ok, take this line of code:
It does absolutely nothing other than create a string which we do nothing with.Code: Select all
$q = "UPDATE users SET last_login = NOW() WHERE id = '" . mysql_real_escape_string($userId) . "' LIMIT 1";
Now take this:
It runs that string as a MySQL query. You're missing the call to mysql_query() in your code.Code: Select all
$q = "UPDATE users SET last_login = NOW() WHERE id = '" . mysql_real_escape_string($userId) . "' LIMIT 1"; mysql_query($q);
I'll also take a wild stab in the dark that this bit of code:
Should be:Code: Select all
WHERE 'Aanvraag_ID[$i]' = 'Aanvraag_ID[$i]
Code: Select all
WHERE Aanvraag_ID = 'Aanvraag_ID[$i]
I think I mis a part of a code in the script where I call and echo the values of Text_ID[0] value=4, Text_ID[1] value=8, Text_ID[3] value=15, etc... I think I need somehow to send these values to the next script, so I can then use these values in the next script where I run the update querry... SET... A=$A, B=$B where Text_ID= Text_ID[$i]
I think I may need a kind of loop but I don't how to do it.
Any idea?
In advance thank you for your help.
Please give a clear exemple so I can better understand the process and reproduce it.
What I try to do is:
1- I call some data from Table_1 and print it on a page (first script, nothing special, SELECT A,B FROM Table_1...)
2- I need to update Table_2 with these data where Text_ID has been selected (second script, update Table_2 SET A=$A, B=$B where Text_ID= Text_ID[$i]).
I hope this is clear.
Thanks a lot.