

If this doesn't resolve your problem try to use concatenation to pass the $query var, like this: exec("mysql -h$host -u$user -p$pass $dbname -e ".$query."") Īlso try to var_dump your $query like this: var_dump($query) īecause you may need to fetch your results before passing them to the exec command. "' FIELDS TERMINATED BY ',' ENCLOSED BY '".$enc."' LINES TERMINATED BY '\n' "

$query = "SELECT DISTINCT(emailid), COUNT(emailid), GROUP_CONCAT(DISTINCT offers) FROM '".
#XAMPP INSTALL UNTERMINATED QUOTED STRING CODE#
So your final code would be: $outfile = '/home/dotslash/file.csv' There may be a problem in your SQL with the. Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. "' FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n' " Įxec("mysql -h$host -u$user -p$pass $dbname -e '$query'") $con = mysql_connect($host, $user, $pass) So your code would look like: $outfile = '/home/dotslash/file.csv' Add this string after your database informations: $con = mysql_connect($host, $user, $pass) Īnd at the end of the script add: mysql_close($con) your syntax error does not transmit over the web: Multiline /*.*/ comments do seldom disturb the parser when linebreaks get ignored. It often only surfaces as an issue when single-line // or # comments are used. Which is occasionally an issue for MacOS users (even on OS X for misconfigured editors). PHP just honors \n newlines, not \r carriage returns. Add the following to the top of your file: /usr/bin/env python Then you should be able to run the following, assuming your script is at /path/to/yourscript. Take care of which type of linebreaks are saved in files. Your Python script is missing a shebang line. In particular BOMs, zero-width spaces, or non-breaking spaces, and smart quotes regularly can find their way into the source code.

Try grep -color -P -n "\" file.php as the first measure to find non-ASCII symbols. i faced problem while im trying to install xampp on ubuntu mate 16.04 i follow this steps : 1 - chmod 755 n. Some problems cannot be found just from looking at your code. Invisible stray Unicode characters: In some cases, you need to use a hexeditor or different editor/viewer on your source. Which might be enlightening as to what the syntax problem is. You can always view a diff of the broken and last working version.
