Sebilj, Sarajevo, Bosnia and Herzegovina

Category Archives: Web

Posts related to web design and programming web applications.

How to spin the Zend Framework on nginx ?

Easy! As you might know, on nginx there is no .htaccess file. So you must specify your routing in .vhost file. Here is an example of one zend page that is spining on nginx. Enjoy! server { listen 111.222.333.444:80; server_name website.ba www.website.ba; root /var/www/website.ba/web/public; index index.html index.htm index.php index.cgi index.pl index.xhtml; location ~ \.shtml$ { […]

Read more

Save SQL result into file

Often it is useful to export a SQL query result into a file. Especially CSVfiles are nice for this task. The following SQL query saves the result in a file called output.csv into the /tmp directory: SELECT * FROM my_table INTO OUTFILE ‘/tmp/output.csv’ FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘\n’;

Read more