Re: please help-edit sql output
| From: | Steph | Date: | Mon, 18 Nov 2002 02:01:32 +0000 |
| Subject: | Re: please help-edit sql output | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2659@lists.php.net to get a copy of this message | ||
Tony, hi -
Play with GtkCList. I'm afraid it's still not documented, but if you
look at gtk.defs in the PHP-GTK source you'll find all its methods
there.
----- Original Message -----
From: "tony g" <kamigwi@netscape.net>
To: "PHP GTK" <php-gtk-general@lists.php.net>
Sent: Monday, November 18, 2002 1:31 AM
Subject: [PHP-GTK] please help-edit sql output
> 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();
>
>
>
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>