I have tried a bunch of soultions on here an other forums but always get errors. Here is current PHP code using hostgator and PHP 5.2
$insert = "INSERT INTO events (datecreated, fullname, email, title, url, picurl, desc, psw, skypeid, event) SELECT jvs.datecreated, jvs.fullname, jvs.email, jvs.title, jvs.url, jvs.picurl, jvs.desc, jvs.psw, jvs.skypeid, jvs.event FROM jvs";
if (! mysqli_query($dbh, $insert) || mysqli_affected_rows($dbh) == 0)
{
die ("<BR><BR><BR>Failed to insert data- " . mysqli_error($dbh));
}
Error I get is:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, psw, skypeid, event) SELECT jvs.datecreated, jvs.fullname, jvs.email, jvs.' at line 1
I have checked every field in both tables and the spelling is correct and the fileds are there. The fileds are not in the same order in events table and that table has many more fields. Thanks, Ed