MySQL Forums
Forum List  »  MySQL Workbench

Re: Workbench 8.0 Utilities - copy as PHP code
Posted by: Philip Burness
Date: August 31, 2022 05:20AM

Hi Peter,
when copying as PHP code from the tools -> Utilities menu and pasting the subsequent copy into an editor you get something along the lines of :-

$query = "SELECT * FROM mydb.table";

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

The $con, $query $field etc variables must be defined somewhere - so is this editable within the workbench config files somewhere and if so where?


Options: ReplyQuote

Written By
Re: Workbench 8.0 Utilities - copy as PHP code
August 31, 2022 05:20AM

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.