I have written the following code that uses a query to pull data from a database table and then loads this data into another database table. The data is successfully pulled from one table and then inserted into the other and then stops before displaying my "Couldn't execute the insert into exportpresort query." message. Using the same set of data, the programs stops as the same point every time. The record it crashes on reads "S.O.B.'s Late Night Dance Party w/ Manhattan Samba Drums". Is there something about my code that looks wrong.
// Here is the query that pulls the data.
$result1b = mysql_query($sql1)
or die ("Couldn't execute the pull from database query.");
echo mysql_error();
// Here is where we put the search results into a temporary database table that we will sort and print out later.
$num1b = mysql_numrows($result1b);
while ($num1b>0)
{
$row1b = mysql_fetch_array ($result1b);
extract ($row1b);
// Here is where we scrub the data
$eventtitle = strip_tags($eventtitle);
$eventtitle = trim($eventtitle);
// Here is where we insert information into the temporary database
$query = "INSERT INTO exportpresort
SET eventtitle = '$eventtitle'";
$result = mysql_query($query)
or die ("Couldn't execute the insert into exportpresort query.");
$num1b--;
}