Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Old 03-21-2007, 05:32 PM AES Query...
Experienced Talker

Posts: 46
Trades: 0
PHP Code:
$ssnpost $_POST['ssn'];

$query "INSERT INTO ".MYSQL_TBL_CLIENTS." SET $query_string, ssn='aes_encrypt('$ssnpost','$aes_key')', advisor='$advisor_id', lastupdate=NOW(), date_referral=NOW()"
Why isn't this working? If I remove the ssn='ae......', section, it works fine. Any solutions?
bld44 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-21-2007, 05:49 PM Re: AES Query...
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Is it possible there are quote marks ( or some other special character ) in either your $ssnpost or $aes_key variables?
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 03-21-2007, 05:55 PM Re: AES Query...
Experienced Talker

Posts: 46
Trades: 0
$ssnpost = $_POST[ssn];
$aes_key = "whateveritis";

If that counts for aes_key.. although I have a AES_DECRYPT function that works with the code like that.
bld44 is offline
Reply With Quote
View Public Profile
 
Old 03-21-2007, 06:06 PM Re: AES Query...
Experienced Talker

Posts: 46
Trades: 0
If I put a mysql die error in, I get the column 'ssn' is specified more than once.. but I don't know why it would be. Thanks for the help.
bld44 is offline
Reply With Quote
View Public Profile
 
Old 03-21-2007, 06:31 PM Re: AES Query...
Experienced Talker

Posts: 46
Trades: 0
Ok, I went back in and deleted the $query_string mess, and used the origional syntax () values ()...

Now, when I try to post, I get this error:
Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 12224, , 1, 1, 2007, aes_encrypt('12345','removedkey' at line 1
This is my query
PHP Code:
$query "INSERT INTO ".MYSQL_TBL_CLIENTS." (fname, lname, address1, address2, city, state_code, zip, county_code, dob_month, dob_day, dob_year, ssn, email, phone, phone_other, condition, working_currently, working_stop_month, working_stop_day, working_stop_year, ssi_applied, denied_benefits, denied_benefits_when_month, denied_benefits_when_day, denied_benefits_when_year, contact_time, client_comments, client_heard) values ($fname$lname$address1$address2$city$state_code$zip$county_code$dob_month$dob_day$dob_year, aes_encrypt('$ssnpost','$aes_key'), $email$phone$phone_other$condition$working_currently$working_stop_month$working_stop_day$working_stop_year$ssi_applied$denied_benefits$denied_benefits_when_month$denied_benefits_when_day$denied_benefits_when_year$contact_time$client_comments$client_heard) SET advisor='$advisor_id', lastupdate=NOW(), date_referral=NOW()"
all of the $... have corresponding post variables earlier in the file, which is pretty long, so I didnt post it.

What the heck does that error mean?
bld44 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to AES Query...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15325 seconds with 12 queries