I am trying to automate several queries in a script, so that I can assign a CRON to perform the insert queries several times a day. I dont believe I am going about this the right way. Here is what I have...can anyone offer a better alternative?
mastertable.php
<?
$username="xxx";
$password="xxx";
$database="xxx";
mysql_pconnect("xxx",$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="INSERT INTO mastertable (Id,baths,baths3_4,bd1_size,bd2_size,bd3_size,bedrooms,color,glaag,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,rooms,school_district,status,tax_years,taxes,town,year_built,features,photo_file,type) SELECT Id,baths,baths3_4,bd1_size,bd2_size,bd3_size,bedrooms,color,glaag,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,rooms,school_district,status,tax_years,taxes,town,year_built,features,photo_file,type FROM residential";
$query="INSERT INTO mastertable (Id,baths_unit,bdrs_unit,color,glaag,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,school_district,status,tax_years,taxes,town,year_built,features,photo_file,near,gross_income,heat_expense,heat_unit,hot_water_unit,ins_expense,elec_unit,maint_expense,nof_1br,nof_2br,nof_3br,nof_cars,nof_units,rooms_unit,trash_expense,utilities_expense,annual_expenses,type) SELECT Id,baths_unit,bdrs_unit,color,glaag,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,school_district,status,tax_years,taxes,town,year_built,features,photo_file,near,gross_income,heat_expense,heat_unit,hot_water_unit,ins_expense,elec_unit,maint_expense,nof_1br,nof_2br,nof_3br,nof_cars,nof_units,rooms_unit,trash_expense,utilities_expense,annual_expenses,type FROM multi";
$query="INSERT INTO mastertable (Id,baths,bedrooms,color,glaag,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,rooms,school_district,status,tax_years,taxes,town,year_built,features,photo_file,mb_fee,mb_make,mb_model,mb_park,nof_cars,type) SELECT Id,baths,bedrooms,color,glaag,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,rooms,school_district,status,tax_years,taxes,town,year_built,features,photo_file,mb_fee,mb_make,mb_model,mb_park,nof_cars,type FROM mobile";
$query="INSERT INTO mastertable (Id,baths,baths3_4,bd1_size,bd2_size,bd3_size,bedrooms,color,glaag,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,rooms,school_district,status,tax_years,taxes,town,year_built,features,photo_file,subdivision,unit_no,nof_cars,type) SELECT Id,baths,baths3_4,bd1_size,bd2_size,bd3_size,bedrooms,color,glaag,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,rooms,school_district,status,tax_years,taxes,town,year_built,features,photo_file,subdivision,unit_no,nof_cars,type FROM condo";
$query="INSERT INTO mastertable (Id,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,school_district,status,tax_years,taxes,town,features,photo_file,near,street_no,tax_rate,water_frontage,easement,frontage,type) SELECT Id,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,school_district,status,tax_years,taxes,town,features,photo_file,near,street_no,tax_rate,water_frontage,easement,frontage,typeFROM land";
$query="INSERT INTO mastertable (Id,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,status,taxes,town,year_built,features,photo_file,near,nof_docks,nof_floors,nof_parkings,nof_units,noi,office_sf,signage,street_name,street_no,available_sf,building_size,frontage,type) SELECT Id,list_price,lister_agent_name,lister_office_name,lot_size_acres,remark1,status,taxes,town,year_built,features,photo_file,near,nof_docks,nof_floors,nof_parkings,nof_units,noi,office_sf,signage,street_name,street_no,available_sf,building_size,frontage,typeFROM commercial";
?>