How to use into out file in an external server
<p>I am trying to use into out file mysql query inside an external host .</p>

<p>my query is like this:</p>

<pre><code>$sql = "SELECT 'Name', 'Email', 'Type of inquiry' , 'Message'
        UNION ALL
        SELECT `engine4_mytbl_contacts`.name ,
        `engine4_mytbl_contacts`.email, 
        `engine4_mytbl_contacts`.topic,
        `engine4_mytbl_contacts`.feed_back
        FROM engine4_mytbl_contacts WHERE contact_date &gt;= '$prevDate' into outfile '$path' FIELDS TERMINATED BY ','   ENCLOSED BY '\"'  LINES TERMINATED BY '\n\r'";
</code></pre>

<p>it's working fine in my local host.
Now I am trying to use that in an external host . My account privilege don't have file permission grant . And I am unable to grant it. Now how can I use this query. Or is there any solution for me ? I mean any alternative way .</p>