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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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..

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.