Our good friends at Stackoverflow have suggested that a prepared statement may overcome a bug in Scriptcase when it come to storing text exactly how it is written. The code I would like to execute is as follows. How would I do that is SC? My stackoverflow post is here
https://stackoverflow.com/questions/…23330_59168611
$query = "SELECT s1 FROM t1"; if (!$result = $con->query($query)) { exit($con->error); } $row = $result->fetch_assoc(); $value = $row['s1']; $query = "INSERT INTO t2(s1) VALUES (?)"; $stmt = $con->prepare($query); $stmt->bind_param('s', $value); $stmt->execute();
I started with this
$mysqli = [sc_glo_db];
But that did not work.
A variation on the above code would for instance be
$omnibotScript2 = $mysqli->real_escape_string($omnibotScript2 );
The question is about how to execute a prepared statement in Scriptcase. It is a fairly advanced question, but any help would be much appreciated.