MySQL Forums
Forum List  »  MySQL Workbench

Workbench 8.0 Utilities - copy as PHP code
Posted by: Philip Burness
Date: August 27, 2022 06:59AM

Is it possible to change & store the default variables used anywhere?

i.e. $con, $query

See below.


$con = new mysqli($host, $user, $password, $dbname, $port, $socket)
or die ('Could not connect to the database server' . mysqli_connect_error());


$query = "SELECT * FROM combat";

if ($stmt = $con->prepare($query)) {
$stmt->bind_result($field1, $field2);
while ($stmt->fetch()) {
//printf("%s, %s\n", $field1, $field2);

Options: ReplyQuote

Written By
Workbench 8.0 Utilities - copy as PHP code
August 27, 2022 06:59AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.