>DansTonCode();

Tous les codes sources "Mais pourquoi ?"page 5

PHP
  4 July, 2016 à 01:30
#299
function MYSQLescapestring( $array ) {
    mysql_real_escape_string( $array );
    return $array;
}
PHP
 30 June, 2016 à 01:30
#295
    $result = (Db::getInstance()->Execute('                                         
      UPDATE `'._DB_PREFIX_.'category`                                              
      SET `position`= `position` '.($way ? '- 1' : '+ 1').'                         
      WHERE `position`                                                              
      '.($way                                                                       
        ? '> '.(int)($movedCategory['position']).' AND `position` <= '.(int)($position)
        : '< '.(int)($movedCategory['position']).' AND `position` >= '.(int)($position)).'
      AND `id_parent`='.(int)($movedCategory['id_parent']))                         
    AND Db::getInstance()->Execute('                                                
      UPDATE `'._DB_PREFIX_.'category`                                              
      SET `position` = '.(int)($position).'                                         
      WHERE `id_parent` = '.(int)($movedCategory['id_parent']).'                    
      AND `id_category`='.(int)($movedCategory['id_category']))); 
Java
 29 June, 2016 à 01:30
#294
if (comboBox.getText().equals("one") return "one"; else if (comboBox.getText().equals("two") return "two"; else return false;