Intereting Posts
Пользовательский Laravel Passport BearerTokenResponse Сделать телефонный звонок через веб-сервер с помощью Asterisk Как определить, нужно ли применять utf8 декодировать или кодировать строку? PHPMailer вызывает 504 тайм-аута на моем сервере Digital Ocean, используя nginx рассчитать ранг пользователя Почему Open Graph Built-In Как не работает больше? Не удается установить PHPUnit через PEAR, требуется PEAR Installer> = 1.9.2, не может обновить PEAR с 1.9.0 Каков самый безопасный способ добавления html / css / js в mysql? Как отправить электронное письмо с помощью PHP? Добавление нескольких полей ввода на основе динамического значения в PHP Разбить одну строку текста без каких-либо различимых точек останова в PHP PHP Дата -1 месяц сегодня не работает Symfony2: Как заставить загружать несколько изображений в один ZIP-файл с помощью Ajax Расширение PHP GD без повторной компиляции PHP-решения codeignign изменить язык form_validation_lang

MySQL Query возвращает пустое поле с AES_ENCRYPT

Моя строка запроса: $SQLstring = "SELECT name, address, city, state, zip, homephone, cellphone, position, shift, status, workedherebefore, previousemploymentdate, referred, empname, under18, friends, empname2, currentlyemployed, contactemployer, lawful, worktime, workweekends, dateavailable, desiredsalary, position1, from1, to1, duties1, company1, cophone1, startsalary, endsalary, reasonleaving1, supervisor1, contact1, position2, from2, to2, duties2, company2, cophone2, startsalary2, endsalary2, reasonleaving2, supervisor2, contact2, position3, from3, to3, duties3, company3, cophone3, startsalary3, endsalary3, reasonleaving3, supervisor3, contact3, comments, training, otherqual, documents, dltype, dlstate, expdate, yearsdriving, movingviolations, hsname, hscity, hsstate, hsdates, collegename, collegecity, collegestate, collegedates, othername, othercity, otherstate, otherdates, licenseorcert, refname1, refbusiness1, reftitle1, refaddress1, refphone1, refname2, refbusiness2, reftitle2, refaddress2, refphone2, refname3, refbusiness3, reftitle3, refaddress3, refphone3,felony, iffelony, fired, iffired, resident, explanation, signed, q1, q2, q3, q4, mq1, mq2, mq3, mq4, mq5, mq6, mq7, mq8, mq9, mq10, mq11, mq12, mq13, mq14, mq15, mq16, mq17, mq18, mq19, mq20, mq21, mq22, mq23, mq24, mq24b, mq25, mq25b, mq26, mq27a, mq27b, mq27c, mq28, mq29, mq30answer, disclosuresig, verify_name, other_names, dob, AES_DECRYPT(ssn,'$key') AS ssn FROM applications"; $SQLstring = "SELECT name, address, city, state, zip, homephone, cellphone, position, shift, status, workedherebefore, previousemploymentdate, referred, empname, under18, friends, empname2, currentlyemployed, contactemployer, lawful, worktime, workweekends, dateavailable, desiredsalary, position1, from1, to1, duties1, company1, cophone1, startsalary, endsalary, reasonleaving1, supervisor1, contact1, position2, from2, to2, duties2, company2, cophone2, startsalary2, endsalary2, reasonleaving2, supervisor2, contact2, position3, from3, to3, duties3, company3, cophone3, startsalary3, endsalary3, reasonleaving3, supervisor3, contact3, comments, training, otherqual, documents, dltype, dlstate, expdate, yearsdriving, movingviolations, hsname, hscity, hsstate, hsdates, collegename, collegecity, collegestate, collegedates, othername, othercity, otherstate, otherdates, licenseorcert, refname1, refbusiness1, reftitle1, refaddress1, refphone1, refname2, refbusiness2, reftitle2, refaddress2, refphone2, refname3, refbusiness3, reftitle3, refaddress3, refphone3,felony, iffelony, fired, iffired, resident, explanation, signed, q1, q2, q3, q4, mq1, mq2, mq3, mq4, mq5, mq6, mq7, mq8, mq9, mq10, mq11, mq12, mq13, mq14, mq15, mq16, mq17, mq18, mq19, mq20, mq21, mq22, mq23, mq24, mq24b, mq25, mq25b, mq26, mq27a, mq27b, mq27c, mq28, mq29, mq30answer, disclosuresig, verify_name, other_names, dob, AES_DECRYPT(ssn,'$key') AS ssn FROM applications";

Я запрашиваю результаты и возвращаю их в таблицу. Все они работают, за исключением поля AES_DECRYPT (ssn). В базе данных он, кажется, был зашифрован отлично, но это поле в запросе возвращается как пустое. Вот остальная часть кода, на всякий случай это актуально:

$key="88b871WZ3SntWK67rN3l2J1SvMqsOjyk";
$QueryResult = @mysql_query($SQLstring, $conn) or die("Query Problem - " . mysql_error($conn) . " - Error Number - " . mysql_errno($conn));

  $num_result = mysql_num_rows($QueryResult); echo "<table>"; for ($i = 0; $i < $num_result; $i++) { $row = mysql_fetch_array($QueryResult); echo "<tr>"; echo "<td>" . $row["name"] . "</td>"; echo "<td>" . $row["email"] . "</td>"; echo "<td>" . $row["address"] . "</td>"; echo "<td>" . $row["city"] . "</td>"; echo "<td>" . $row["state"] . "</td>"; echo "<td>" . $row["zip"] . "</td>"; echo "<td>" . $row["homephone"] . "</td>"; echo "<td>" . $row["cellphone"] . "</td>"; echo "<td>" . $row["position"] . "</td>"; echo "<td>" . $row["shift"] . "</td>"; echo "<td>" . $row["status"] . "</td>"; echo "<td>" . $row["workedherebefore"] . "</td>"; echo "<td>" . $row["previousemploymentdate"] . "</td>"; echo "<td>" . $row["referred"] . "</td>"; echo "<td>" . $row["empname"] . "</td>"; echo "<td>" . $row["under18"] . "</td>"; echo "<td>" . $row["friends"] . "</td>"; echo "<td>" . $row["empname2"] . "</td>"; echo "<td>" . $row["currentlyemployed"] . "</td>"; echo "<td>" . $row["contactemployer"] . "</td>"; echo "<td>" . $row["lawful"] . "</td>"; echo "<td>" . $row["worktime"] . "</td>"; echo "<td>" . $row["workweekends"] . "</td>"; echo "<td>" . $row["dateavailable"] . "</td>"; echo "<td>" . $row["desiredsalary"] . "</td>"; echo "<td>" . $row["position1"] . "</td>"; echo "<td>" . $row["from1"] . "</td>"; echo "<td>" . $row["to1"] . "</td>"; echo "<td>" . $row["duties1"] . "</td>"; echo "<td>" . $row["company1"] . "</td>"; echo "<td>" . $row["cophone1"] . "</td>"; echo "<td>" . $row["startsalary"] . "</td>"; echo "<td>" . $row["endsalary"] . "</td>"; echo "<td>" . $row["reasonleaving1"] . "</td>"; echo "<td>" . $row["supervisor1"] . "</td>"; echo "<td>" . $row["contact1"] . "</td>"; echo "<td>" . $row["position2"] . "</td>"; echo "<td>" . $row["from2"] . "</td>"; echo "<td>" . $row["to2"] . "</td>"; echo "<td>" . $row["duties2"] . "</td>"; echo "<td>" . $row["company2"] . "</td>"; echo "<td>" . $row["cophone2"] . "</td>"; echo "<td>" . $row["startsalary2"] . "</td>"; echo "<td>" . $row["endsalary2"] . "</td>"; echo "<td>" . $row["reasonleaving2"] . "</td>"; echo "<td>" . $row["supervisor2"] . "</td>"; echo "<td>" . $row["contact2"] . "</td>"; echo "<td>" . $row["position3"] . "</td>"; echo "<td>" . $row["from3"] . "</td>"; echo "<td>" . $row["to3"] . "</td>"; echo "<td>" . $row["duties3"] . "</td>"; echo "<td>" . $row["company3"] . "</td>"; echo "<td>" . $row["cophone3"] . "</td>"; echo "<td>" . $row["startsalary3"] . "</td>"; echo "<td>" . $row["endsalary3"] . "</td>"; echo "<td>" . $row["reasonleaving3"] . "</td>"; echo "<td>" . $row["supervisor3"] . "</td>"; echo "<td>" . $row["contact3"] . "</td>"; echo "<td>" . $row["comments"] . "</td>"; echo "<td>" . $row["training"] . "</td>"; echo "<td>" . $row["otherqual"] . "</td>"; echo "<td>" . $row["documents"] . "</td>"; echo "<td>" . $row["dltype"] . "</td>"; echo "<td>" . $row["dlstate"] . "</td>"; echo "<td>" . $row["expdate"] . "</td>"; echo "<td>" . $row["yearsdriving"] . "</td>"; echo "<td>" . $row["movingviolations"] . "</td>"; echo "<td>" . $row["hsname"] . "</td>"; echo "<td>" . $row["hscity"] . "</td>"; echo "<td>" . $row["hsstate"] . "</td>"; echo "<td>" . $row["hsdates"] . "</td>"; echo "<td>" . $row["collegename"] . "</td>"; echo "<td>" . $row["collegecity"] . "</td>"; echo "<td>" . $row["collegestate"] . "</td>"; echo "<td>" . $row["collegedates"] . "</td>"; echo "<td>" . $row["othername"] . "</td>"; echo "<td>" . $row["othercity"] . "</td>"; echo "<td>" . $row["otherstate"] . "</td>"; echo "<td>" . $row["otherdates"] . "</td>"; echo "<td>" . $row["licenseorcert"] . "</td>"; echo "<td>" . $row["refname1"] . "</td>"; echo "<td>" . $row["refbusiness1"] . "</td>"; echo "<td>" . $row["reftitle1"] . "</td>"; echo "<td>" . $row["refaddress1"] . "</td>"; echo "<td>" . $row["refphone1"] . "</td>"; echo "<td>" . $row["refname2"] . "</td>"; echo "<td>" . $row["refbusiness2"] . "</td>"; echo "<td>" . $row["reftitle2"] . "</td>"; echo "<td>" . $row["refaddress2"] . "</td>"; echo "<td>" . $row["refphone2"] . "</td>"; echo "<td>" . $row["refname3"] . "</td>"; echo "<td>" . $row["refbusiness3"] . "</td>"; echo "<td>" . $row["reftitle3"] . "</td>"; echo "<td>" . $row["refaddress3"] . "</td>"; echo "<td>" . $row["refphone3,felony"] . "</td>"; echo "<td>" . $row["iffelony"] . "</td>"; echo "<td>" . $row["fired"] . "</td>"; echo "<td>" . $row["iffired"] . "</td>"; echo "<td>" . $row["resident"] . "</td>"; echo "<td>" . $row["explanation"] . "</td>"; echo "<td>" . $row["signed"] . "</td>"; echo "<td>" . $row["q1"] . "</td>"; echo "<td>" . $row["q2"] . "</td>"; echo "<td>" . $row["q3"] . "</td>"; echo "<td>" . $row["q4"] . "</td>"; echo "<td>" . $row["mq1"] . "</td>"; echo "<td>" . $row["mq2"] . "</td>"; echo "<td>" . $row["mq3"] . "</td>"; echo "<td>" . $row["mq4"] . "</td>"; echo "<td>" . $row["mq5"] . "</td>"; echo "<td>" . $row["mq6"] . "</td>"; echo "<td>" . $row["mq7"] . "</td>"; echo "<td>" . $row["mq8"] . "</td>"; echo "<td>" . $row["mq9"] . "</td>"; echo "<td>" . $row["mq10"] . "</td>"; echo "<td>" . $row["mq11"] . "</td>"; echo "<td>" . $row["mq12"] . "</td>"; echo "<td>" . $row["mq13"] . "</td>"; echo "<td>" . $row["mq14"] . "</td>"; echo "<td>" . $row["mq15"] . "</td>"; echo "<td>" . $row["mq16"] . "</td>"; echo "<td>" . $row["mq17"] . "</td>"; echo "<td>" . $row["mq18"] . "</td>"; echo "<td>" . $row["mq19"] . "</td>"; echo "<td>" . $row["mq20"] . "</td>"; echo "<td>" . $row["mq21"] . "</td>"; echo "<td>" . $row["mq22"] . "</td>"; echo "<td>" . $row["mq23"] . "</td>"; echo "<td>" . $row["mq24"] . "</td>"; echo "<td>" . $row["mq24b"] . "</td>"; echo "<td>" . $row["mq25"] . "</td>"; echo "<td>" . $row["mq25b"] . "</td>"; echo "<td>" . $row["mq26"] . "</td>"; echo "<td>" . $row["mq27a"] . "</td>"; echo "<td>" . $row["mq27b"] . "</td>"; echo "<td>" . $row["mq27c"] . "</td>"; echo "<td>" . $row["mq28"] . "</td>"; echo "<td>" . $row["mq29"] . "</td>"; echo "<td>" . $row["mq30answer"] . "</td>"; echo "<td>" . $row["disclosuresig"] . "</td>"; echo "<td>" . $row["verify_name"] . "</td>"; echo "<td>" . $row["other_names"] . "</td>"; echo "<td>" . $row['ssn'] . "</td>"; echo "<td>" . $row["dob"] . "</td>"; echo "</tr>"; } echo "</table>"; }