Re: [PHP] Checking Post Data against DB Data

2007-07-17 Thread kvigor
I really like the re-coding it's great. I'm still new and below code is definitely more efficient. FYI: I do have date field sorry I wasn't so clear. I just didn't post all code. ""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Doing a select to get every recor

Re: [PHP] Checking Post Data against DB Data

2007-07-11 Thread Chris
kvigor wrote: OK Chris, I understand that we're checking checking the form data and escaping it, but can explain what's going on in the WHERE clause and 1=1 tad bit more. Instead of looking at all records in your original attempt (which will work fine for 10 records), you limit what you are

Re: [PHP] Checking Post Data against DB Data

2007-07-11 Thread Richard Lynch
Doing a select to get every record, and then looping through them all, concatenating a bunch of stuff together, and then using PHP to test == is not very efficient... Why not just: $sql = array_map('mysql_real_insert_string', $POST); $query = " select count(*) from central "; $query .= " where co

Re: [PHP] Checking Post Data against DB Data

2007-07-11 Thread kvigor
OK Chris, I understand that we're checking checking the form data and escaping it, but can explain what's going on in the WHERE clause and 1=1 tad bit more. "Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvigor wrote: >> /*Good Morning to All, >> >> I am having an issue

Re: [PHP] Checking Post Data against DB Data

2007-07-10 Thread Chris
kvigor wrote: /*Good Morning to All, I am having an issue with the following code. I'm trying to match $newRegistrant(which is concatenated form data) with $oldRegistrant(which is concatenated DB data). First thing I'd suggest is making the code clearer about what's going on. Doing it the

[PHP] Checking Post Data against DB Data

2007-07-10 Thread kvigor
/*Good Morning to All, I am having an issue with the following code. I'm trying to match $newRegistrant(which is concatenated form data) with $oldRegistrant(which is concatenated DB data). The code is suppose to check if the Registrants match, if they do, then check if last registration was l