Hello Ron,
If I understand correctly, you're asking what query to execute (and how
to put the result in a textfile) to get the results you want?
The first part is described thorougly in the mysql-manual (chapter
14.1.7 for example, search for the SELECT syntax or examples. You'll
find it at
It is a problem having write access to the file. This is what the online
mySQL manual says ...
The SELECT ... INTO OUTFILE 'file_name' form of SELECT writes the selected
rows to a file. The file is created on the server host, so you must have the
FILE privilege to use this syntax. The file
It has been my experience that you sometimes need to do backquotes (`)
in MySQL queries when cutting/pasting into PHP -- it's the same key as
the tilde (~) on my keyboard. Try:
$result = mysql_query(SELECT e_mail FROM subscriptionsdatabase WHERE
`discipleship_mailing_list_e_mail_subscription`
Whoops -- the fclose() statement refers to $result when it should refer
to $handle. My bad for not at least spot checking the message before
hitting send!
--
Peter Ellis - [EMAIL PROTECTED]
Web Design and Development Consultant
naturalaxis | http://www.naturalaxis.com/
On Mon, 2004-08-09 at
On Tuesday 10 August 2004 11:34, Peter Ellis wrote:
It has been my experience that you sometimes need to do backquotes (`)
in MySQL queries when cutting/pasting into PHP -- it's the same key as
the tilde (~) on my keyboard. Try:
$result = mysql_query(SELECT e_mail FROM subscriptionsdatabase
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
It seems to me that, at least in terms of consistency, using backticks
isn't a bad idea. After all, if you look at any current version of
phpMyAdmin that generates PHP selection code, it uses backticks
constantly. I take your point, but it seems to me like it's a good
habit no matter what.