Date: Thu, 23 Feb 2006 17:01:54 -0400 From: Duane Whitty <duane@greenmeadow.ca> To: FreeBSD Questions <freebsd-questions@freebsd.org> Cc: fbsd_user@a1poweruser.com Subject: Re: Looking for a mentor on php/mysql Message-ID: <43FE22C2.4000307@greenmeadow.ca> In-Reply-To: <50888.207.70.139.52.1140669118.squirrel@www.compedgeracing.com> References: <MIEPLLIBMLEEABPDBIEGKEINHCAA.fbsd_user@a1poweruser.com> <50888.207.70.139.52.1140669118.squirrel@www.compedgeracing.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --Boundary_(ID_SE6Zgks3qNORMkf/rm7mOQ) Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT Robert Uzzi wrote: >> I am trying to teach my self php/mysql/html programming. >> I have done native static html web sites before. >> Running FreeBSD 6.0 with apache13, php, and mysql all installed and >> working. >> >> Have read a few php books and searched the web for code snippets. >> Have been on some of the php forum sites, but responses are not forth >> coming. >> >> Looking for a mentor to guide me with puting all the pieces together. >> I have a working panel for registering a user that writes to a flat >> text file. >> Need guidance in changing this to use mysql. Would email you direct >> outside of the questions list. >> >> >> > > While I don't consider myself knowledgable enough to help you with php I > have found this site helpful when I am looking for code ideas. > http://www.tutorialized.com/tutorials/PHP/1 > > Hi, I'm not experienced enough in PHP to be a mentor in it but from one beginner to another maybe this will be useful. Here is a link to a resource I used to get myself up-and-running with PHP. http://www.hudzilla.org/phpbook/index.php I wrote the attached code when I playing around with the example from the MySQL manual. It's just play code bu maybe it can point you to the name of functions (methods) to investigate. Hth, --Duane --Boundary_(ID_SE6Zgks3qNORMkf/rm7mOQ) Content-transfer-encoding: 7BIT Content-disposition: inline; filename=database.php MIME-Version: 1.0 Content-Type: text/plain; name="database.php" Accessing a MySQL Database Using PHP Starting PHP script '; ?> host_info); echo ' '; printf("Server info: %s\n", $mysqli->server_info); echo ' '; $query = "SELECT CURRENT_USER();"; $query .= "SELECT name FROM pet"; /* execute multi query */ if ($mysqli->multi_query($query)) { do { /* store first result set */ if ($result = $mysqli->store_result()) { while ($row = $result->fetch_row()) { printf("%s ", $row[0]); } $result->close(); } /* print divider */ if ($mysqli->more_results()) { printf("----------------- "); } } while ($mysqli->next_result()); } /* close connection */ $mysqli->close(); ?> --Boundary_(ID_SE6Zgks3qNORMkf/rm7mOQ)--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43FE22C2.4000307>