много кавычек

    Date: 11/12/07 (Code WTF)    Keywords: php, sql, web

    Пожаловались мне в аську давеча на чужой код...

    
    $sql = "UPDATE " . USERS_TABLE . "SET  . $username_sql . $passwd_sql . "
    user_email = '" . str_replace("\'", "''", $email) . "', 
    user_icq = '" . str_replace("\'", "''", $icq) . "', 
    user_website = '" . str_replace("\'", "''", $website) . "', 
    user_occ = '". str_replace("\'", "''", $occupation) . "', 
    user_from = '" . str_replace("\'", "''", $location) . "', 
    user_interests = '" . str_replace("\'", "''", $interests) . "', 
    user_sig = '" . str_replace("\'", "''", $signature) . "', 
    user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', 
    ...
    WHERE user_id = $user_id";
    


    19:48:58: и суко где то тут падает
    19:49:13: ктото толи мод для phpBB делал
    19:49:16: толи че то
    19:49:21: толи сам phpBB такой агуеный
    ...
    19:53:54: залечил
    19:54:03: запутался человек ф кавычках

    Source: http://community.livejournal.com/code_wtf/112766.html

« Индусы и STL || JavaScript,... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home