Hi, I'm trying to export data from my mysql database to a text file using the 'INTO OUTFILE" funtions. If I run the query command using the mysql interface it works fine but whey I try to use it in a simple PHP script with the mysql_query command no files are written.
I'm running the PHP script as root for testing and also the DB user has all mysql privileges and the /tmp directory has write permissions, etc.
Here's the PHP script I'm using.. Maybe someone can see what I'm doing wrong?
<?php
// Database Settings
$dbhost = "localhost";
$dblogin = "root";
$dbpwd = "password";
$dbname = "cart";
mysql_query ("SELECT `cart_products`.`product_code` FROM cart_products WHERE `supplier_id` = 26 into outfile '/tmp/cart_items.txt'");
?>
Thanks in advance for any help you can provide..
Ralph