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!