Re: PHPWeather-devel digest, Vol 1 #176 - 1 msg
Brought to you by:
iridium
From: Martin G. <gim...@gi...> - 2003-06-22 12:53:39
|
Aqa...@ao... writes: > Apparently all the files appear to be there, and the permissions > appear to be in place as well, Hmm, that's strange then. > I know the host utilizes php 4, and my site is ready to use any php > program, I also have a db, which I dont understand to use one, so > maybe I am supposed to use a db? No, there's no need to play with using a database before PhpWeather works. > I have access to ftp site, but i have a db username and > password..but I dont know how to use a db. So I presume I have to > ftp to my db? if so how do I do that? and what files do I put in > their? No, no, you access a database using a query language, most probably SQL. The interfacing is done by PhpWeather, you can take a look at the db/pw_db_mysql.php file to see some SQL statements such as $this->query('DROP TABLE IF EXISTS ' . $this->properties['db_metars']); which cleans the database if necessary before creating a new table for hte data with $this->query('CREATE TABLE ' . $this->properties['db_metars'] . '( icao char(4) NOT NULL, metar varchar(255) NOT NULL, timestamp timestamp(14), PRIMARY KEY (icao), UNIQUE icao (icao))'); and so on. There's much information about SQL on the web, see http://www.w3schools.com/sql/default.asp for a tutorial. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. |