database query match |
[eluser]andes[/eluser]
hi, i want to be able to take the data from my form, say name and last name and then be able to run a query to see if the name and last name are already in the database, if it is, then to display the data in the third column of this table, and if not, then to just enter it into the database so in summary, user enters form: name and last name a function should search the database table column name and last name and see if there is a match, if yes, then return data in the third column of this table if not, then insert name and last name into database can somebody help/guide me in the right direction here? thanks in advance
[eluser]web-johnny[/eluser]
[quote author="andes" date="1309742975"]hi, i want to be able to take the data from my form, say name and last name and then be able to run a query to see if the name and last name are already in the database, if it is, then to display the data in the third column of this table, and if not, then to just enter it into the database so in summary, user enters form: name and last name a function should search the database table column name and last name and see if there is a match, if yes, then return data in the third column of this table if not, then insert name and last name into database can somebody help/guide me in the right direction here? thanks in advance[/quote] You can use the active record of codeigniter you can see at http://ellislab.com/codeigniter/user-gui...ecord.html |
Welcome Guest, Not a member yet? Register Sign In |