how to insert the output of php query into mysql -
i want insert data database outout is
<?php echo ''.pq('#giro_0 td[align="right"]')->html();?>
how into
$sql = "insert ing(aaa,bbb,ccc) values(curdate(),'bbb', xxx )";
where xxx can put value database.
you put in variable instead of echoing it.
$html = pq('#giro_0 td[align="right"]')->html();
then stick placeholder in sql:
$sql = "insert ing(aaa,bbb,ccc) values(curdate(),'bbb', ? )";
then use whatever function database api uses populate placeholders.
$stmt->bind_param('s', $html);
Comments
Post a Comment