Showing posts with label workbench. Show all posts
Showing posts with label workbench. Show all posts

Friday, September 23, 2011

Workbench Scripts

A was checking out the new Workbench today after I saw this blog post http://wb.mysql.com/?p=1169

It all worked great and very easy.  Nice clean code that helps out the PHP Developer.
example:
$host="localhost";
$port=3306;
$socket="";
$user="";
$password="";
$dbname="";

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

//$con->close();


$query = "SELECT * FROM exampledb";


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

While this is a simple example it is a fantastic way for new developers to get started and learn how things are done.

A DBA can easily write a complex query and hand over PHP code to the developer. Nice work!

The ability to then write your own plugins really opens it up for some advanced developers. 

This is a step in the right direction and supports working together between DBA and developer.

Wednesday, August 17, 2011

Show your support for MySQL Workbench !


The 2011 DevProConnections CommunityChoice Awards has two categories that include nominations for MySQL Workbench !

You can support MySQL Workbench with your vote. The two categories that include Workbench are, “Component Set” (page 1 # 7) and “IDE” (page 2 #14).

The survey is available here and information about workbench is always available here: http://www.mysql.com/products/workbench/