Re: Exporting Data From MySQL Using PHP

From: Date: Tue, 10 Aug 2004 05:33:20 +0000
Subject: Re: Exporting Data From MySQL Using PHP
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-35651@lists.php.net to get a copy of this message
Ron Piggott wrote:
I was able to get the command: SELECT e_mail FROM subscriptionsdatabase WHERE discipleship_mailing_list_e_mail_subscription LIKE 'on' to work in the mySQL command prompt but when I put it into a .PHP file I get
a parse error. I get that parse error by simply coping and pasting the command into the PHP file.
The reason that this didn't work is that you have to tell PHP first to create a link with your database, then execute a query and get back the results by issuing a few specific commands. Robby's example shows you how, but it's more thorougly explained in the php documentation. Have a look at http://www.php.net/manual/en/ref.mysql.php and its subpages. It has examples and explanations you'll find very useful in setting up PHP to work with a MySQL database. Regards, Guus der Kinderen

« previous php.db (#35651) next »