Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8939513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:50:29+00:00 2026-06-15T10:50:29+00:00

My query string is $SQLstring = SELECT name, address, city, state, zip, homephone, cellphone,

  • 0

My query string is $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";

I query the results and then return them in a table. All of them work except for the AES_DECRYPT field (ssn). In the database it seems to have been encrypted fine, but this field in the query is returned as blank. Here is the rest of the code, just in case it’s relevant:


$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>";
    }

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:50:30+00:00Added an answer on June 15, 2026 at 10:50 am

    To use AES_ENCRYPT and AES_DECRYPT the field type must be BLOB. I had it set to VARCHAR and it wasn’t recognizing some of the characters. Changing the field type to blob worked perfectly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My query string is like: SELECT ... FROM maintable LEFT JOIN table1 on (maintable.id
I make a query: String query = SELECT DISTINCT a FROM A a FETCH
I have the following Java code: String query = Select 1 from myTable where
So I have this: const string sqlString = SELECT * FROM Causes c INNER
I'm trying to pass two variables (a search query (String) and a column name
Beside query string root folder how do i get the current doc library list(ListName)
I have a query string that contains a variable like this $field_name = 'features';
I have a query string: a=1&b=2&c[1]=3&c[2]=4 etc… I want a NSDictionary where a =>
I use query string to access my pages. I try to make if anyone
I am retrieving one query string parameter, and for that my code is <a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.