| | |
Verifying Record before submitting to db
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2008
Posts: 15
Reputation:
Solved Threads: 0
I have a registration page that needs one final thing and I'm a little stumped...
In one table I have email, pass, gender, dob and the other I have company...
In the registration page, I want to check that the company exists before I submit the form... Since I'm using tools for this and NOT hand coding things, I'm a little lost... Ideally using an AJAX script to check on the orgcode input field would rock...
Here's what I have...
any coaching would be great!
Ted
In one table I have email, pass, gender, dob and the other I have company...
In the registration page, I want to check that the company exists before I submit the form... Since I'm using tools for this and NOT hand coding things, I'm a little lost... Ideally using an AJAX script to check on the orgcode input field would rock...
Here's what I have...
MySQL Syntax (Toggle Plain Text)
SELECT * FROM orgcode WHERE orgcode = '" . $orgcode . "'
any coaching would be great!
Ted
Does Table1 (email, pass, gender, dob) have a foreign key constraint on CompanyTable? If so, let the database handle the foreign key validation and have the web application check for errors.
Insert failures due to foreign key problems (ie: non-existant CompanyId) will have a specific error number stating a foreign key problem.
Insert failures due to foreign key problems (ie: non-existant CompanyId) will have a specific error number stating a foreign key problem.
I NEED AN ADULT!
•
•
•
•
Since I'm using tools for this and NOT hand coding things, I'm a little lost... Ideally using an AJAX script to check on the orgcode input field would rock...
In the example, there is a dropdown list, but you have a text field. You can use onblur event (or onkeyup event) to call the ajax function to check if the value entered in the text field is already there in the database.
Ignorance is definitely not bliss!
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
Other Threads in the MySQL Forum
- Previous Thread: Results from 2 tables
- Next Thread: I Need MySql Statement for this
| Thread Tools | Search this Thread |
agplv3 alfresco amazon api aws bizspark breathalyzer changingprices cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier join journalism keyword keywords kickfire laptop law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization






