PHP: Safely Query MySQL

$safe = mysql_real_escape_string($unsafe);

Use this for sql injection attacks!

Advertisements

ezSQL Functions and Variables

Functions:

  1. $db->get_results
  2. $db->get_row
  3. $db->get_col
  4. $db->get_var
  5. $db->query
  6. $db->debug
  7. $db->vardump
  8. $db->select
  9. $db->get_col_info
  10. $db->hide_errors
  11. $db->show_errors
  12. $db->escape
  13. $db = new db

Variables:

  • $db->num_rows
  • $db->insert_id
  • $db->rows_affected
  • $db->num_queries
  • $db->debug_all
  • $db->cache_dir
  • $db->cache_queries
  • $db->cache_inserts
  • $db->use_disk_cache
  • $db->cache_timeout

Squirrelmail Turkish Support Fix

functions/i18n.php
$languages[‘tr_TR’][‘NAME’] = ‘Turkish’;
$languages[‘tr_TR’][‘CHARSET’] = ‘utf-8’;
$languages[‘tr_TR’][‘LOCALE’] = array(‘tr_TR.utf-8′,’tr_TR.utf-8′,’tr_TR’);
$languages[‘tr’][‘ALIAS’] = ‘tr_TR’;

Download and upload tr_TR localization files to locale folder.

config/config.php
$squirrelmail_default_language = ‘en_US‘;
Change en_US to tr_TR
Change $default_charset = ‘iso-8859-1‘; to 8859-9