الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

نقل بيانات جدول في قاعدة إلى قاعدة أخرى،SQL PHP

مغلق
بدأه حسام الملحم في 21 نوفمبر 2005 · 1 رد · 410 مشاهدة · في منتدى تطوير المواقع بـ PHP
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

عندي هذا الاستعلام،، هل طريقتي صحيحة في إنجاز هذه المهمة.. أريد نقل بيانات من جدول إلى جدول آخر في قاعدة بيانات أخرى...

//الدخول إلى قاعدة البيانات الأولى.
connects_ahsa();
$select_a_query="select * from all_applicant";
$exe_select_a_query=call_mysql_query($select_a_query);
$select_a_num=row_num($exe_select_a_query);
//echo $select_a_num;
closes();

//هنا ينقل الى داتا بيس 2
connects();
  for($i=1;$i<$select_a_num;$i++)
  
    {

       $ahsa_select_info = get_data($exe_select_a_query);

       $ahsa_query="INSERT INTO all_applicant(campus_id,status,id,active_status,Inactive_status,app_code,ar_name1,ar_name2,ar_name3,ar_name4,ar_name,en_name1,en_name2,en_name3,en_name4,en_name,birth_date,birth_place,gender,tel_home,tel_fax,tel_mobile,tel_office,email,home_add,mail_add,martial_status,completed_hours,english_level,has_pc,disability,note,school_name,school_type,school_gpa,school_year,school_country,work_type,company,nationality_id,major_id,degree_id,admin_date,entered_by,term_id,admin_fee,file_id,file_certificate,file_photo,paid,payment_method,last_updated,updated_by)
      valuse('".$ahsa_select_info["campus_id"]."','"
      .$ahsa_select_info["status"]."','"
      .$ahsa_select_info["id"]."','"
      .$ahsa_select_info["active_status"]."','"
      .$ahsa_select_info["InActive_status"]."','"
      .$ahsa_select_info["app_code"]."','"
      .$ahsa_select_info["ar_name1"]."','"
      .$ahsa_select_info["ar_name2"]."','"
      .$ahsa_select_info["ar_name3"]."','"
      .$ahsa_select_info["ar_name4"]."','"
      .$ahsa_select_info["ar_name"]."','"
      .$ahsa_select_info["en_name1"]."','"
      .$ahsa_select_info["en_name2"]."','"
      .$ahsa_select_info["en_name3"]."','"
      .$ahsa_select_info["en_name4"]."','"
      .$ahsa_select_info["en_name"]."','"
      .$ahsa_select_info["birth_date"]."','"
      .$ahsa_select_info["birth_place"]."','"
      .$ahsa_select_info["gender"]."','"
      .$ahsa_select_info["tel_home"]."','"
      .$ahsa_select_info["tel_fax"]."','"
      .$ahsa_select_info["tel_mobile"]."','"
      .$ahsa_select_info["tel_office"]."','"
      .$ahsa_select_info["email"]."','"
      .$ahsa_select_info["home_add"]."','"
      .$ahsa_select_info["mail_add"]."','"
      .$ahsa_select_info["martial_status"]."','"
      .$ahsa_select_info["completed_hours"]."','"
      .$ahsa_select_info["english_level"]."','"
      .$ahsa_select_info["has_pc"]."','"
      .$ahsa_select_info["disability"]."','"
      .$ahsa_select_info["note"]."','"
      .$ahsa_select_info["school_name"]."','"
      .$ahsa_select_info["school_type"]."','"
      .$ahsa_select_info["school_gpa"]."','"
      .$ahsa_select_info["school_year"]."','"
      .$ahsa_select_info["school_country"]."','"
      .$ahsa_select_info["work_type"]."','"
      .$ahsa_select_info["company"]."','"
      .$ahsa_select_info["nationality_id"]."','"
      .$ahsa_select_info["major_id"]."','"
      .$ahsa_select_info["degree_id"]."','"
      .$ahsa_select_info["admin_date"]."','"
      .$ahsa_select_info["entered_by"]."','"
      .$ahsa_select_info["term_id"]."','"
      .$ahsa_select_info["admin_fee"]."','"
      .$ahsa_select_info["file_id"]."','"
      .$ahsa_select_info["file_certificate"]."','"
      .$ahsa_select_info["file_photo"]."','"
      .$ahsa_select_info["paid"]."','"
      .$ahsa_select_info["payment_method"]."','"
      .$ahsa_select_info["last_updated"]."','"
      .$ahsa_select_info["updated_by"]."')";
      
       $exe_ahsa_query=call_mysql_query($ahsa_query);
    
    }
      closes();

تم تعديل هذه المشاركة بواسطة أبومازن في 21 نوفمبر 2005 في 10:36

#2

هو هذا الكود كفكرة ممتاز ولا كلام عليه

لكن المشكلة في اخطاء التنفيذ

اقتراح علييك التنفيذ و انتظار النتائج

Let's google help you Before ask

--------------------------

My Blog : www.phplover.net

هذا الموضوع مغلق.

مواضيع مشابهة