Jump to content

[SOLVED] php file to work 2 databases help


shambala

Recommended Posts

i dont know how you will relate your table bu this might help

@wsantos i think this time i read the threads lol

UPDATE student_data 
INNER JOIN all_students ON student_data.number=all_students.number
SET student_data.number=all_students.number,
student_data.first_name=all_students.first_name,
student_data.last_name=all_students.last_name,
student_data.teacher=all_students.teacher,
student_data.room=all_students.room 
WHERE all_students.number = 1234567 AND student_data.number=all_students.number

i dont know how you will relate your table bu this might help

@wsantos i think this time i read the threads lol

UPDATE student_data 
INNER JOIN all_students ON student_data.number=all_students.number
SET student_data.number=all_students.number,
student_data.first_name=all_students.first_name,
student_data.last_name=all_students.last_name,
student_data.teacher=all_students.teacher,
student_data.room=all_students.room 
WHERE all_students.number = 1234567 AND student_data.number=all_students.number

 

Im surprised you actually did...LOL typical kababayan

I haven't really dealt with this kind of situation before since all the data with on one table is all present on another wherein it can be directly related to an id (number). Im out...work tomorrow morning

 

reading give you tons of info in fact i dont think im gonna have this kind of query in my work so i also dont also deal with this kind of query but im always preparing my self for harder and crazy stuff

you know you never know what will be your second task..

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.