All,
Another query has me stumped. I have tried a number of examples online, with no success.
I am trying to copy a few fields from one table to another. The examples I found online make it seem simple. Am I missing the obvious here?
I am trying this in it’s own PHP script, which is below. I thank you in advance for your help.
[CODE]error_reporting(E_ALL | E_NOTICE);ini_set(‘display_errors’, ‘1’);
$con = mysqli_connect(“localhost”, “timw79_rfid”, “xpress13”, “timw79_rxrfid”);
$query = “INSERT TagHistory (TagID, ReaderID, AssignedMachine, AssignedRig, Lat, Long)
SELECT TagID, ReaderID, AssignedMachine, AssignedRig, Lat, Long
FROM TagHistoryprep”;
if (!mysqli_query($con,$query)) {
die(‘Error: ‘ . mysqli_error($con));
}
I am getting the following error:
[CODE][COLOR=#000000][FONT=Times New Roman]Error: 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 ‘Long) SELECT TagID, ReaderID, AssignedMachine, AssignedRig, Lat, Long FROM Tag’ at line 1[/FONT][/COLOR]