You could capture your result and then use fopen to store the results in a local file or you could record the result in another database table.
Ta
Baz
I'm trying to capture the results of a database query in a seperate file using 'INTO OUTFILE' but receive an 'Access denied for user user@'localhost' (using password: YES)' error when I run my script.
Is there a work around this as I've found out a lot of host will not allow 'INTO OUTFILE'.
I do not want to use a php include in my site as my database query has an 'ORDER BY RAND () command in it which really slows things up!
Ideally I'd like to run the database query once a day by CRON, capture the results in another file and include that file in my site to help speed things up.
I'm a litte stumped at the moment on how to do this as every method I have tried so far just copies my database query script which is no good for me.
You could capture your result and then use fopen to store the results in a local file or you could record the result in another database table.
Ta
Baz
chessyb (03-09-09)
If I have understood correctly what you are trying to do, you could maybe output the results as an xml file and then use this xml file wherever you want
chessyb (03-09-09)
I've managed to solve the problem by saving the results of the query as an external csv file. Thank you to Andrew and Barry for the nudge in the right direction. :tup
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks