New Girl Needs Help Installing

New Girl Needs Help Installing

am 01.01.2006 16:46:58 von s.williams2005

Hey guys,

I was asked to learn SQL for my employer. The book I'm starting in said that
I would need; a web server(Apache), so that it can access the PHP language.
In addition, I would need MySQL installed and PHP has to be able to
recognize MySQL.

So..
I downloaded :
apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
mysql-essential-5.0.18-win32 (mySQL installer package)
php-5.1.1-installer (PHP installer package)


I installed apache i followed the directions exactly as on the site and then
tested it by typing http://localhost/ in to my browser and a page came up
that said it was installed.

Then, I installed MySQL. Then it said to test that MySQL was working
properly I would then open MySQL Command Line Client, simply enter the
password, and if the client allows access with no errors, that MySQL would
be working properly. .. There were no errors.

Lastly I installed the PHP. The instructions said that after installing PHP
that we would need to configure a few options to make PHP work. It then said
to edit the httpd.conf file. So i added these lines after the last line of
the config file:

ScriptAlias /php/ "c:/server/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

Next it said to create a file in htdocs folder called phpinfo.php.Then to
open the file and place the following code within it:



Next to save and close the file then open IE and type
http://localhost/phpinfo.php in the bar. If i saw a certain page come up
that it worked. It didn't work but I followed all the instructions exactly
as stated. Any idea why?

Please Help,
Stephanie

Re: New Girl Needs Help Installing

am 01.01.2006 16:59:08 von s.williams2005

Also I don't quite understand what PHP is?

Stephanie


"S.Williams" wrote in message
news:%PStf.27829$Ou3.22181@dukeread09...
> Hey guys,
>
> I was asked to learn SQL for my employer. The book I'm starting in said
> that I would need; a web server(Apache), so that it can access the PHP
> language. In addition, I would need MySQL installed and PHP has to be able
> to recognize MySQL.
>
> So..
> I downloaded :
> apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
> mysql-essential-5.0.18-win32 (mySQL installer package)
> php-5.1.1-installer (PHP installer package)
>
>
> I installed apache i followed the directions exactly as on the site and
> then tested it by typing http://localhost/ in to my browser and a page
> came up that said it was installed.
>
> Then, I installed MySQL. Then it said to test that MySQL was working
> properly I would then open MySQL Command Line Client, simply enter the
> password, and if the client allows access with no errors, that MySQL would
> be working properly. .. There were no errors.
>
> Lastly I installed the PHP. The instructions said that after installing
> PHP that we would need to configure a few options to make PHP work. It
> then said to edit the httpd.conf file. So i added these lines after the
> last line of the config file:
>
> ScriptAlias /php/ "c:/server/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php.exe"
>
> Next it said to create a file in htdocs folder called phpinfo.php.Then to
> open the file and place the following code within it:
>
>
>
> Next to save and close the file then open IE and type
> http://localhost/phpinfo.php in the bar. If i saw a certain page come up
> that it worked. It didn't work but I followed all the instructions exactly
> as stated. Any idea why?
>
> Please Help,
> Stephanie
>

Re: New Girl Needs Help Installing

am 01.01.2006 21:20:39 von daemon

S.Williams wrote:
> Also I don't quite understand what PHP is?
>
> Stephanie
>
>
> "S.Williams" wrote in message
> news:%PStf.27829$Ou3.22181@dukeread09...
>
>>Hey guys,
>>
>>I was asked to learn SQL for my employer. The book I'm starting in said
>>that I would need; a web server(Apache), so that it can access the PHP
>>language. In addition, I would need MySQL installed and PHP has to be able
>>to recognize MySQL.
>>
>>So..
>>I downloaded :
>> apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
>> mysql-essential-5.0.18-win32 (mySQL installer package)
>> php-5.1.1-installer (PHP installer package)
>>
>>
>>I installed apache i followed the directions exactly as on the site and
>>then tested it by typing http://localhost/ in to my browser and a page
>>came up that said it was installed.
>>
>>Then, I installed MySQL. Then it said to test that MySQL was working
>>properly I would then open MySQL Command Line Client, simply enter the
>>password, and if the client allows access with no errors, that MySQL would
>>be working properly. .. There were no errors.
>>
>>Lastly I installed the PHP. The instructions said that after installing
>>PHP that we would need to configure a few options to make PHP work. It
>>then said to edit the httpd.conf file. So i added these lines after the
>>last line of the config file:
>>
>>ScriptAlias /php/ "c:/server/php/"
>>AddType application/x-httpd-php .php
>>Action application/x-httpd-php "/php/php.exe"
>>
>>Next it said to create a file in htdocs folder called phpinfo.php.Then to
>>open the file and place the following code within it:
>>
>>
>>
>>Next to save and close the file then open IE and type
>>http://localhost/phpinfo.php in the bar. If i saw a certain page come up
>>that it worked. It didn't work but I followed all the instructions exactly
>>as stated. Any idea why?
>>
>>Please Help,
>>Stephanie
>>
>
>
>

Did you save your changes to the configuration file... and restart Apache?

PHP is a server side language. If you can imagine so, take Javscript,
and you have math functions, setting varibles, and define your own
functions based on collected information about the client and the
computer the script is executing. Well, PHP is all of that, and more,
but it only uses the HTTP protocol to obtain system information. But
it's not limited to that! You can use PHP to gather large quantities of
information from many differnt sources including your MySQL database.

The simplest function used is pretty much the most basic.

PHP is secure, depending on the security used to ensure its entagrity
from the programmer.

The next thing you might want to try is


echo 'hello world';

?>

Re: New Girl Needs Help Installing

am 01.01.2006 21:48:19 von s.williams2005

I did save the changes and restarted apache. still to no avail... didn't
work. so I proceeded w/the book. the first application example i created was
a 'guestbook'. So i opened my MySQL command line client and entered my
password. I then typed create database guestbook; at the prompt. it said
query ok, 1 row affected.
i next typed create table; and it said error 1054 (42000): You have an error
in your SQL syntax; check the manual that corresponds to your MySQL server
version for the right syntax to use near ' ' at line 1

so i disregarded the error and kept going.. in which i typed use guestbook:
and it said error 1049 (42000): Unknown database 'guestbook:'

yeah.. so i ignored that too.. lol. and kept going. i typed:
create table guestbook
-> (
-> name varchar(40) null,
-> location varchar(40) null,
-> email varchar(40) null,
-> url varchar(40) null,
-> comments text null,
-> )
-> ;

and it came up w/another error.. to no suprise.. it said Error 1046 (3D000):
No database selected. so here is an idea of where i'm at and what i'm trying
to do. but i think it is because of the PHP.. i dunno. help!

Stephanie
"Daemon" wrote in message news:rQWtf.99$tl.12@pd7tw3no...
> S.Williams wrote:
>> Also I don't quite understand what PHP is?
>>
>> Stephanie
>>
>>
>> "S.Williams" wrote in message
>> news:%PStf.27829$Ou3.22181@dukeread09...
>>
>>>Hey guys,
>>>
>>>I was asked to learn SQL for my employer. The book I'm starting in said
>>>that I would need; a web server(Apache), so that it can access the PHP
>>>language. In addition, I would need MySQL installed and PHP has to be
>>>able to recognize MySQL.
>>>
>>>So..
>>>I downloaded :
>>> apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
>>> mysql-essential-5.0.18-win32 (mySQL installer package)
>>> php-5.1.1-installer (PHP installer package)
>>>
>>>
>>>I installed apache i followed the directions exactly as on the site and
>>>then tested it by typing http://localhost/ in to my browser and a page
>>>came up that said it was installed.
>>>
>>>Then, I installed MySQL. Then it said to test that MySQL was working
>>>properly I would then open MySQL Command Line Client, simply enter the
>>>password, and if the client allows access with no errors, that MySQL
>>>would be working properly. .. There were no errors.
>>>
>>>Lastly I installed the PHP. The instructions said that after installing
>>>PHP that we would need to configure a few options to make PHP work. It
>>>then said to edit the httpd.conf file. So i added these lines after the
>>>last line of the config file:
>>>
>>>ScriptAlias /php/ "c:/server/php/"
>>>AddType application/x-httpd-php .php
>>>Action application/x-httpd-php "/php/php.exe"
>>>
>>>Next it said to create a file in htdocs folder called phpinfo.php.Then to
>>>open the file and place the following code within it:
>>>
>>>
>>>
>>>Next to save and close the file then open IE and type
>>>http://localhost/phpinfo.php in the bar. If i saw a certain page come up
>>>that it worked. It didn't work but I followed all the instructions
>>>exactly as stated. Any idea why?
>>>
>>>Please Help,
>>>Stephanie
>>>
>>
>>
>>
>
> Did you save your changes to the configuration file... and restart Apache?
>
> PHP is a server side language. If you can imagine so, take Javscript,
> and you have math functions, setting varibles, and define your own
> functions based on collected information about the client and the
> computer the script is executing. Well, PHP is all of that, and more,
> but it only uses the HTTP protocol to obtain system information. But
> it's not limited to that! You can use PHP to gather large quantities of
> information from many differnt sources including your MySQL database.
>
> The simplest function used is pretty much the most basic.
>
> PHP is secure, depending on the security used to ensure its entagrity
> from the programmer.
>
> The next thing you might want to try is
>
> >
> echo 'hello world';
>
> ?>

Re: New Girl Needs Help Installing

am 02.01.2006 00:03:03 von Mick White

S.Williams wrote:
> I did save the changes and restarted apache. still to no avail... didn't
> work. so I proceeded w/the book. the first application example i created was
> a 'guestbook'. So i opened my MySQL command line client and entered my
> password. I then typed create database guestbook; at the prompt. it said
> query ok, 1 row affected.
> i next typed create table; and it said error 1054 (42000): You have an error
> in your SQL syntax; check the manual that corresponds to your MySQL server
> version for the right syntax to use near ' ' at line 1
>
> so i disregarded the error and kept going.. in which i typed use guestbook:

use guestbook;

Note the semi-colon, not a colon

Mick


> and it said error 1049 (42000): Unknown database 'guestbook:'
>
> yeah.. so i ignored that too.. lol. and kept going. i typed:
> create table guestbook
> -> (
> -> name varchar(40) null,
> -> location varchar(40) null,
> -> email varchar(40) null,
> -> url varchar(40) null,
> -> comments text null,
> -> )
> -> ;
>
> and it came up w/another error.. to no suprise.. it said Error 1046 (3D000):
> No database selected. so here is an idea of where i'm at and what i'm trying
> to do. but i think it is because of the PHP.. i dunno. help!
>
> Stephanie
> "Daemon" wrote in message news:rQWtf.99$tl.12@pd7tw3no...
>
>>S.Williams wrote:
>>
>>>Also I don't quite understand what PHP is?
>>>
>>>Stephanie
>>>
>>>
>>>"S.Williams" wrote in message
>>>news:%PStf.27829$Ou3.22181@dukeread09...
>>>
>>>
>>>>Hey guys,
>>>>
>>>>I was asked to learn SQL for my employer. The book I'm starting in said
>>>>that I would need; a web server(Apache), so that it can access the PHP
>>>>language. In addition, I would need MySQL installed and PHP has to be
>>>>able to recognize MySQL.
>>>>
>>>>So..
>>>>I downloaded :
>>>> apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
>>>> mysql-essential-5.0.18-win32 (mySQL installer package)
>>>> php-5.1.1-installer (PHP installer package)
>>>>
>>>>
>>>>I installed apache i followed the directions exactly as on the site and
>>>>then tested it by typing http://localhost/ in to my browser and a page
>>>>came up that said it was installed.
>>>>
>>>>Then, I installed MySQL. Then it said to test that MySQL was working
>>>>properly I would then open MySQL Command Line Client, simply enter the
>>>>password, and if the client allows access with no errors, that MySQL
>>>>would be working properly. .. There were no errors.
>>>>
>>>>Lastly I installed the PHP. The instructions said that after installing
>>>>PHP that we would need to configure a few options to make PHP work. It
>>>>then said to edit the httpd.conf file. So i added these lines after the
>>>>last line of the config file:
>>>>
>>>>ScriptAlias /php/ "c:/server/php/"
>>>>AddType application/x-httpd-php .php
>>>>Action application/x-httpd-php "/php/php.exe"
>>>>
>>>>Next it said to create a file in htdocs folder called phpinfo.php.Then to
>>>>open the file and place the following code within it:
>>>>
>>>>
>>>>
>>>>Next to save and close the file then open IE and type
>>>>http://localhost/phpinfo.php in the bar. If i saw a certain page come up
>>>>that it worked. It didn't work but I followed all the instructions
>>>>exactly as stated. Any idea why?
>>>>
>>>>Please Help,
>>>>Stephanie
>>>>
>>>
>>>
>>>
>>Did you save your changes to the configuration file... and restart Apache?
>>
>>PHP is a server side language. If you can imagine so, take Javscript,
>>and you have math functions, setting varibles, and define your own
>>functions based on collected information about the client and the
>>computer the script is executing. Well, PHP is all of that, and more,
>>but it only uses the HTTP protocol to obtain system information. But
>>it's not limited to that! You can use PHP to gather large quantities of
>>information from many differnt sources including your MySQL database.
>>
>>The simplest function used is pretty much the most basic.
>>
>>PHP is secure, depending on the security used to ensure its entagrity
>>from the programmer.
>>
>>The next thing you might want to try is
>>
>> >>
>>echo 'hello world';
>>
>>?>
>
>
>

Re: New Girl Needs Help Installing

am 02.01.2006 13:05:12 von IanP

You might be better using the gui tools provided rather than the
commandline client. Download and install the MySQL Administrator and the
MySQL Query browser. (from http://dev.mysql.com)

S.Williams wrote:
> I did save the changes and restarted apache. still to no avail... didn't
> work. so I proceeded w/the book. the first application example i created was
> a 'guestbook'. So i opened my MySQL command line client and entered my
> password. I then typed create database guestbook; at the prompt. it said
> query ok, 1 row affected.
> i next typed create table; and it said error 1054 (42000): You have an error
> in your SQL syntax; check the manual that corresponds to your MySQL server
> version for the right syntax to use near ' ' at line 1
>
> so i disregarded the error and kept going.. in which i typed use guestbook:
> and it said error 1049 (42000): Unknown database 'guestbook:'
>
> yeah.. so i ignored that too.. lol. and kept going. i typed:
> create table guestbook
> -> (
> -> name varchar(40) null,
> -> location varchar(40) null,
> -> email varchar(40) null,
> -> url varchar(40) null,
> -> comments text null,
> -> )
> -> ;
>
> and it came up w/another error.. to no suprise.. it said Error 1046 (3D000):
> No database selected. so here is an idea of where i'm at and what i'm trying
> to do. but i think it is because of the PHP.. i dunno. help!
>
> Stephanie
> "Daemon" wrote in message news:rQWtf.99$tl.12@pd7tw3no...
>
>>S.Williams wrote:
>>
>>>Also I don't quite understand what PHP is?
>>>
>>>Stephanie
>>>
>>>
>>>"S.Williams" wrote in message
>>>news:%PStf.27829$Ou3.22181@dukeread09...
>>>
>>>
>>>>Hey guys,
>>>>
>>>>I was asked to learn SQL for my employer. The book I'm starting in said
>>>>that I would need; a web server(Apache), so that it can access the PHP
>>>>language. In addition, I would need MySQL installed and PHP has to be
>>>>able to recognize MySQL.
>>>>
>>>>So..
>>>>I downloaded :
>>>> apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
>>>> mysql-essential-5.0.18-win32 (mySQL installer package)
>>>> php-5.1.1-installer (PHP installer package)
>>>>
>>>>
>>>>I installed apache i followed the directions exactly as on the site and
>>>>then tested it by typing http://localhost/ in to my browser and a page
>>>>came up that said it was installed.
>>>>
>>>>Then, I installed MySQL. Then it said to test that MySQL was working
>>>>properly I would then open MySQL Command Line Client, simply enter the
>>>>password, and if the client allows access with no errors, that MySQL
>>>>would be working properly. .. There were no errors.
>>>>
>>>>Lastly I installed the PHP. The instructions said that after installing
>>>>PHP that we would need to configure a few options to make PHP work. It
>>>>then said to edit the httpd.conf file. So i added these lines after the
>>>>last line of the config file:
>>>>
>>>>ScriptAlias /php/ "c:/server/php/"
>>>>AddType application/x-httpd-php .php
>>>>Action application/x-httpd-php "/php/php.exe"
>>>>
>>>>Next it said to create a file in htdocs folder called phpinfo.php.Then to
>>>>open the file and place the following code within it:
>>>>
>>>>
>>>>
>>>>Next to save and close the file then open IE and type
>>>>http://localhost/phpinfo.php in the bar. If i saw a certain page come up
>>>>that it worked. It didn't work but I followed all the instructions
>>>>exactly as stated. Any idea why?
>>>>
>>>>Please Help,
>>>>Stephanie
>>>>
>>>
>>>
>>>
>>Did you save your changes to the configuration file... and restart Apache?
>>
>>PHP is a server side language. If you can imagine so, take Javscript,
>>and you have math functions, setting varibles, and define your own
>>functions based on collected information about the client and the
>>computer the script is executing. Well, PHP is all of that, and more,
>>but it only uses the HTTP protocol to obtain system information. But
>>it's not limited to that! You can use PHP to gather large quantities of
>>information from many differnt sources including your MySQL database.
>>
>>The simplest function used is pretty much the most basic.
>>
>>PHP is secure, depending on the security used to ensure its entagrity
>>from the programmer.
>>
>>The next thing you might want to try is
>>
>> >>
>>echo 'hello world';
>>
>>?>
>
>
>

Re: New Girl Needs Help Installing

am 02.01.2006 14:31:37 von Simon Bridgewater

get WAMPP
see apachefriends.org


"S.Williams" wrote in message
news:%PStf.27829$Ou3.22181@dukeread09...
> Hey guys,
>
> I was asked to learn SQL for my employer. The book I'm starting in said
that
> I would need; a web server(Apache), so that it can access the PHP
language.
> In addition, I would need MySQL installed and PHP has to be able to
> recognize MySQL.
>
> So..
> I downloaded :
> apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
> mysql-essential-5.0.18-win32 (mySQL installer package)
> php-5.1.1-installer (PHP installer package)
>
>
> I installed apache i followed the directions exactly as on the site and
then
> tested it by typing http://localhost/ in to my browser and a page came up
> that said it was installed.
>
> Then, I installed MySQL. Then it said to test that MySQL was working
> properly I would then open MySQL Command Line Client, simply enter the
> password, and if the client allows access with no errors, that MySQL would
> be working properly. .. There were no errors.
>
> Lastly I installed the PHP. The instructions said that after installing
PHP
> that we would need to configure a few options to make PHP work. It then
said
> to edit the httpd.conf file. So i added these lines after the last line of
> the config file:
>
> ScriptAlias /php/ "c:/server/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php.exe"
>
> Next it said to create a file in htdocs folder called phpinfo.php.Then to
> open the file and place the following code within it:
>
>
>
> Next to save and close the file then open IE and type
> http://localhost/phpinfo.php in the bar. If i saw a certain page come up
> that it worked. It didn't work but I followed all the instructions exactly
> as stated. Any idea why?
>
> Please Help,
> Stephanie
>
>

Re: New Girl Needs Help Installing

am 02.01.2006 17:14:46 von Simon Bridgewater

sorry meant xampp

http://www.apachefriends.org/en/xampp.html


"Simon" wrote in message
news:ZW9uf.16084$r4.11329@newsfe1-gui.ntli.net...
> get WAMPP
> see apachefriends.org
>
>
> "S.Williams" wrote in message
> news:%PStf.27829$Ou3.22181@dukeread09...
> > Hey guys,
> >
> > I was asked to learn SQL for my employer. The book I'm starting in said
> that
> > I would need; a web server(Apache), so that it can access the PHP
> language.
> > In addition, I would need MySQL installed and PHP has to be able to
> > recognize MySQL.
> >
> > So..
> > I downloaded :
> > apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
> > mysql-essential-5.0.18-win32 (mySQL installer package)
> > php-5.1.1-installer (PHP installer package)
> >
> >
> > I installed apache i followed the directions exactly as on the site and
> then
> > tested it by typing http://localhost/ in to my browser and a page came
up
> > that said it was installed.
> >
> > Then, I installed MySQL. Then it said to test that MySQL was working
> > properly I would then open MySQL Command Line Client, simply enter the
> > password, and if the client allows access with no errors, that MySQL
would
> > be working properly. .. There were no errors.
> >
> > Lastly I installed the PHP. The instructions said that after installing
> PHP
> > that we would need to configure a few options to make PHP work. It then
> said
> > to edit the httpd.conf file. So i added these lines after the last line
of
> > the config file:
> >
> > ScriptAlias /php/ "c:/server/php/"
> > AddType application/x-httpd-php .php
> > Action application/x-httpd-php "/php/php.exe"
> >
> > Next it said to create a file in htdocs folder called phpinfo.php.Then
to
> > open the file and place the following code within it:
> >
> >
> >
> > Next to save and close the file then open IE and type
> > http://localhost/phpinfo.php in the bar. If i saw a certain page come up
> > that it worked. It didn't work but I followed all the instructions
exactly
> > as stated. Any idea why?
> >
> > Please Help,
> > Stephanie
> >
> >
>
>

Re: New Girl Needs Help Installing

am 03.01.2006 15:56:48 von Hilarion

> I was asked to learn SQL for my employer. The book I'm starting in said that
> I would need; a web server(Apache), so that it can access the PHP language.
> In addition, I would need MySQL installed and PHP has to be able to
> recognize MySQL.

Are you sure you are reading the proper book?
Learning SQL does not require you to have webserver with PHP or even a MySQL
server (it can be any SQL engine, including - which does not mean it's
a good idea - plain MS Access file). If you do not want to learn how to
make dynamic HTML web-pages based on server-side PHP script, then dump
this book and look for some tutorials on SQL in the Internet.


> So..
> I downloaded :
> apache_2.0.55-win32-x86-no_ssl (windows apache installer package)
> mysql-essential-5.0.18-win32 (mySQL installer package)
> php-5.1.1-installer (PHP installer package)
>
>
> I installed apache i followed the directions exactly as on the site and then
> tested it by typing http://localhost/ in to my browser and a page came up
> that said it was installed.

It looks like you have the apache webserver installed OK.


> Then, I installed MySQL. Then it said to test that MySQL was working
> properly I would then open MySQL Command Line Client, simply enter the
> password, and if the client allows access with no errors, that MySQL would
> be working properly. .. There were no errors.

So it looks like you have MySQL database server installed OK.


> Lastly I installed the PHP. The instructions said that after installing PHP
> that we would need to configure a few options to make PHP work. It then said
> to edit the httpd.conf file. So i added these lines after the last line of
> the config file:
>
> ScriptAlias /php/ "c:/server/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php.exe"
>
> Next it said to create a file in htdocs folder called phpinfo.php.Then to
> open the file and place the following code within it:
>
>
>
> Next to save and close the file then open IE and type
> http://localhost/phpinfo.php in the bar. If i saw a certain page come up
> that it worked. It didn't work but I followed all the instructions exactly
> as stated. Any idea why?

Looks like some configuration issue. I've never had a problem with WAMP
(Windows + Apache + MySQL + PHP) instalations, so I do not know what to
look for, but you'll probably find many articles about configuring PHP
to work with your Apache and MySQL with Google. There also may be something
about it in PHP manual and/or Apache manual and/or MySQL manual because
those three are used together very often (make sure you read about
Windows case).


Hilarion

Re: New Girl Needs Help Installing

am 03.01.2006 16:39:25 von Hilarion

> Also I don't quite understand what PHP is?


PHP is server-side (at least in your case and in most cases in general)
scripting engine used mostly to generate dynamic HTML web-pages.
If you know what HTML is, then you probably also know that it's
not possible using HTML only or even HTML with JavaScript to
interact with server data (eg. to create a guestbook, forum, or
even to place some data from a database in a HTML document). PHP
(and other server-side solutions) aid in this task.
They do not have much in common with SQL (many dynamic web-pages
use SQL to interact with databases, but this does not mean that
learning PHP helps with learning SQL or vice versa).


Hilarion

Re: New Girl Needs Help Installing

am 03.01.2006 16:53:47 von Hilarion

> I did save the changes and restarted apache. still to no avail... didn't
> work. so I proceeded w/the book.

It's not a good idea. When you do not have working PHP, then you'll
not be able to run any application. It will not prevent you from using
MySQL itself or Apache itself, but if the book says that you have to
have PHP support installed, then it'll probably sooner or later tell
you to use it.


> the first application example i created was
> a 'guestbook'. So i opened my MySQL command line client and entered my
> password. I then typed create database guestbook; at the prompt. it said
> query ok, 1 row affected.

It does not look like application to me. It looks like creating database
and it's structure. Yes, maybe this database will be used in the guestbook
application, but it's not an application by itself.


> i next typed create table; and it said error 1054 (42000): You have an error
> in your SQL syntax; check the manual that corresponds to your MySQL server
> version for the right syntax to use near ' ' at line 1

If it was a good book, then it should describe what does "CREATE TABLE ...."
mean. From it you should know that "CREATE TABLE;" is not a valid SQL
command because you only stated that you want to create table, but did
not provide the table name or structure.
As someone pointed out earlier you should now give command "use guestbook;"
which will inform MySQL that you want to interact with just created guestbook
database (all comands which do not explicitly state database they operate
on will executed since the "use..." statement will operate on that database).
The "CREATE TABLE" statement should have something more before the semicolon.


> so i disregarded the error and kept going..

Which again is NOT a good idea.


> in which i typed use guestbook:
> and it said error 1049 (42000): Unknown database 'guestbook:'

"use guestbook;" should be before the previous "CREATE TABLE" and
should use semicolon as terminating character (not a colon).


> yeah.. so i ignored that too.. lol.

Dont expect something to work if you did not made all the steps
before it.


> and kept going. i typed:
> create table guestbook
> -> (
> -> name varchar(40) null,
> -> location varchar(40) null,
> -> email varchar(40) null,
> -> url varchar(40) null,
> -> comments text null,
> -> )
> -> ;

This "CREATE TABLE" statement is complete: has table name (but should
NOT use same name as database name) and structure.


> and it came up w/another error.. to no suprise.. it said Error 1046 (3D000):
> No database selected.

Because you did not selected the database correctly with "use..." command.


> so here is an idea of where i'm at and what i'm trying to do.

You are performing steps which you do not understand. What is that
dumb book going to teach you if it does not explain what you are doing
and how it's supposed to work?



> but i think it is because of the PHP.. i dunno.

No, it's not. PHP has NOTHING to do with creating database structure.
Yes, you could use PHP application to create it, or use PHP application
which uses the created database structure, but it's not the case.
In this case only thing you need is MySQL server (no Apache or PHP),
but it'll probably change in the further parts of the book.


> help!

Please dump that book or read some tutorials on SQL (and then on PHP)
before you come back to that book.



Hilarion

Re: New Girl Needs Help Installing

am 03.01.2006 16:59:12 von Hilarion

> You might be better using the gui tools provided rather than the
> commandline client. Download and install the MySQL Administrator and the
> MySQL Query browser. (from http://dev.mysql.com)


I do not recommend any administrative GUI application if the user
does not understand the databases and SQL basics. Yes, some GUI
query tool, which makes execution of SQL statements easier (and
which presents the output in a more readable way) could be used,
but the problem here is not the tool, but the way of learning SQL.


Hilarion

Re: New Girl Needs Help Installing

am 05.01.2006 16:45:58 von jds

On Sun, 01 Jan 2006 15:48:19 -0500, S.Williams wrote:

> and it came up w/another error.. to no suprise.. it said Error 1046 (3D000):
> No database selected. so here is an idea of where i'm at and what i'm trying
> to do. but i think it is because of the PHP.. i dunno. help!


Your errors have nothing to do with PHP.

My question to you is, do you need to learn *SQL* or do you need to learn
*Web Development using SQL and a web-oriented sever language*?

If you only need to learn SQL, then ditch the PHP and Apache stuff -- they
really have nothing to do with SQL, a database interaction language.


To go back to your errors...

1) you created a database:
"create database guestbook;"

And it said "OK"

NOW you need to *USE* the database before you continue:

use guestbook;

THEN you can type the "create table" and other database manipulation
commands.

Also, don't ignore errors!! They are there for a reason!!

Hmmm... I just looked at your post again and you said you did type "use
guestbook". So not sure what the problem is, except it is likely that you
had a typo. Also, MySQL command-line client is CasE SenSiTIve!! Check
your caps lock key.

And finally, try this command:

show databases;

It should show something like this:

mysql> show databases;
+-------------------------+
| Database |
+-------------------------+
| guestbook |
+-------------------------+
1 row in set (0.06 sec)


later...

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Re: New Girl Needs Help Installing

am 05.01.2006 16:48:15 von jds

On Mon, 02 Jan 2006 12:05:12 +0000, Ian Pawson wrote:

> You might be better using the gui tools provided rather than the
> commandline client. Download and install the MySQL Administrator and the
> MySQL Query browser. (from http://dev.mysql.com)

And how is that going to help someone learn SQL? Don't use the GUI until
you understand the underlying principles involved, is what I say.

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Re: New Girl Needs Help Installing

am 12.01.2006 13:01:31 von markwh04

S.Williams wrote:
> Hey guys,
>
> I was asked to learn SQL for my employer.

You're on the Web, I presume. So, it's helpful to learn that the very
instant an absence of information is mentioned in any context, a reflex
will suddenly take over your body compelling you -- within a mere
fraction of a second -- to hit a search engine and do a query and
(within mere minutes) assimilate like a Borg what was formerly unknown.

This is but a small fraction of what comes up after 0.21 seconds at
once such query

SQL-related entries on the Wikipedia
http://en.wikipedia.org/wiki/SQL
http://en.wikipedia.org/wiki/Microsoft_SQL_Server
http://en.wikipedia.org/wiki/SQL_Server

and that's just the Wikipedia.

> The book I'm starting in

Book? They still exist? It takes longer to physically open a book
(never mind reading it) than it does to go through all the above.

Oh yeah ... and:

A PHP query at Yahoo:
http://search.yahoo.com/search?p=PHP&fr=FP-tab-web-t-296&tog gle=1&cop=&ei=UTF-8

The PHP site.
http://www.php.net

I didn't even know what PHP was 10 seconds ago.

The Occupational Job Outlook that just came out a short while ago had
some pretty interesting things to say about librarians. Even though it
indicated it was to be a high growth field for the years immediately to
come (one of the tops, supposedly); they also put dark clouds on the
horizon (which are coming along much faster than they indicated)
pointing out that the whole industry is set to be obsolete -- merely by
the fact, as illustrated above, that the very phrase "I don't know" is
set to become obsolete now that the entirety of the world's knowledge,
or large portion thereof, is a mere fraction of a second away from the
mere thought of getting it.