Exact mysql prepared statement syntax using macros

I can do this perfectly in mysql, but do not see how to do it correctly with macros. I am trying to load line by line.

$handle = fopen(“c:/raw/intake/{tablename}”, “r”);
if ($handle) {
while (($line = fgets($handle)) !== false) { //good so far

Now in a straight sql or php environment, I would say
$sql=“INSERT INTO loadtable SET wstring=?”;

$stmt =$conn->prepare($sql);
$stmt->execute(array( $line ));

HOW Do I do this with the macros? Have tried one of everything. Is it possible to do a str_replace on $line somewhere in there also? Want to replace apostrophes (in $line) with escape apostrophe so it doesn’t stop loading.

Thanks so much. Tried talking to regular support and we never did communicate really!

I am not sure to understand what you mean by use macros

is this what you are looking for

$sql=“INSERT INTO loadtable SET wstring= ‘" . str_replace("’","’’",$field1) . “’”;
sc_exec_sql($sql);

Thank you. Got myself in a more complicated brain loop than was required!