Category Archives: Coding

All kinds of Programming.

htaccess php_flag not allowed here

By | June 13, 2011

If using this code <IfModule mod_php5.c> #Turn off php register globals php_flag register_globals off </IfModule> gives the error : .htaccess: php_flag not allowed here in /var/log/apache/error.log Then Options should be added to AllowOverride in : /etc/apache2/sites-available/default AllowOverride FileInfo Options like this <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride FileInfo Options Order allow,deny allow from all… Read More »

List foreign keys in mysql

By | September 5, 2009

information_schema The following query will list out the foreign keys in mysql. It finds it out from the information_schema database. select concat(table_name, ‘.’, column_name) as ‘foreign key’, concat(referenced_table_name, ‘.’, referenced_column_name) as ‘references’ from information_schema.key_column_usage where referenced_table_name is not null; The output is a clean table listing out all foreign keys from all databases +———————–+————-+ |… Read More »