Re: Tutorial for php/MySQL on an ISP?
| From: | Matt Schroebel | Date: | Tue, 29 Aug 2000 14:01:23 +0000 |
| Subject: | Re: Tutorial for php/MySQL on an ISP? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-14120@lists.php.net to get a copy of this message | ||
All you need to do is to take the command line stuff, put it into a php variable and use php to
access mysql.
For example:.
<?php
$db = mysql_connect("host", "user", "password");
mysql_create_db ("mydb");
mysql_select_db("mydb",$db);
$sql = "CREATE TABLE employees ( id tinyint(4)
DEFAULT '0' NOT NULL AUTO_INCREMENT,
first varchar(20), last varchar(20), address varchar(255),
position varchar(50), PRIMARY KEY (id), UNIQUE id (id))";
$result = mysql_query($sql) or die(mysql_error());
$sql="INSERT INTO employees VALUES (1,'Bob','Smith',
'128 Here St, Cityname','Marketing Manager')";
$result = mysql_query($sql) or die(mysql_error());
?>
>>> "Calagan" <calagan@beer.com> 08/28 6:13 PM >>>
Hi,
I'd like to know if there's any tutorial designed for users who wish to get
started with php/MySQL, without installing them locally, but working on
ISP's servers, where there's no command line access.
Most tutorials (like WebMonkey's) will show you how to create a table
locally and then use the command line to dump the table into the database,
which is impossible when you work your your ISP's database.
I signed up for several free hosts that offer php/MySQL
(http://www.jumpworld.net, http://hosting.datablocks.net,
http://www.coolfreehost.com) , but their tech support is
very limited.
Thanks in advance for your help.
Calagan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net