Your problem there is embedded ' in the data your trying to insert.
There are two ways of approaching this.
AddSlashes on the data before it's inserted should work, or you can use str_replace("'","",$variable);
Personally i don't like embeding the ' char in data that i put in DB's as it causes alsorts of hard to track down and unforseen probs.
Which ever method you use, you'll have to modify the actual data your inserting.
How you do this is up to you, while you cant actually do it as part of the INSERT, you can chain the functions together where you make the Query string EG:
$myquery = "INSERT INTO workorders(WADOCO, WALITM, WADL01) VALUES('".addslashes($nt[WADOCO])."', '".addslashes($nt[WALITM])."','".addslashes($nt[WADL01])."')";
However for cleanliness and readability of code i would suggest doing it the following way:
$newWADOCO = addslashes( $nt[WADOCO] );
$newWALITM = addslashes( $nt[WALITM] );
$newWADL01 = addslashes( $nt[WADL01] );
$myquery = "INSERT INTO workorders(WADOCO, WALITM, WADL01) VALUES('".$newWADOCO."', '".$newWALITM."','".$newWADL01."')";
As you can see it's much more readable, and you can chop and change your functions quickly & easily, as well as combining them...
Cheers
Shawty