please help-edit sql output

From: Date: Mon, 18 Nov 2002 01:31:53 +0000
Subject: please help-edit sql output
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2658@lists.php.net to get a copy of this message
hi , new at php-gtk, but enjoying it, and making some progress my question is, is there anyway of making the output from mysql editable, maybe for later update after changing some values? i am reading the manual and experimenting abit but so far no luck. please help thanks tony create table biodata ( name text, age int, gender text); $extension = "php_gtk" . (strpos(PHP_OS, "WIN") >= 0 ? ".dll" : ".so"); dl($extension); $window = &new GtkWindow(); $window->set_title("Test App"); $window->set_default_size(500, 300); $window->connect_object('destroy',array('gtk', 'main_quit')); $box = &new GtkVBox(); $window->add($box); $button = &new GtkButton("Connect and Get Rows"); $button->connect("clicked", "getdata"); $box->pack_start($button); function getdata() { global $window; global $button; global $box; global $pList;
     $button->hide();
    $s = mysql_connect("","","") or die("Couldn't connect to database server");
$d = mysql_select_db("personnel", $s); $result = mysql_query("select * from biodata where name = 'john'");
     while($row = mysql_fetch_array($result))
{
   $pList .= "Name    " . $row[1] . "\n".  "Age    " . $row["age"] . "\n" . "Gender    " .$row["sex"] . "\n";
} $p = &new GtkLabel("$pList"); $box->add($p); $p->show(); } $window->show_all(); gtk::main();

« previous php.gtk.general (#2658) next »