Help with record already present

maxinic

Member
In my database I would make sure that when a user inserts a new author, checks whether it already exists. If yes asks whether or not to
Eg
table Authors
name - Last Name
Mario - Rossi
Hugh - Hefnerr

The user enters Mario Rossi and system asks, already present! Do you want to continue? If yes, you enter, otherwise delete the Form

Is there any plugin ready or do I insert a php code in plugin form?

Any suggestion for the code?

Thanks
 
Hmmm, the only way I can think of doing this would be with some custom JS, that calls a user_ajax.php method. Not the sort of code I can just knock out off the top of my head. So it's possible, but would take an hour or so of coding to do.

Unless anyone else has any ideas?

-- hugh
 
Is Mario - Rossi allowed in the database more than once? Is this not a normalised field, i.e a databasejoin?

Do you want to continue? If yes, you enter,

Enter a new record for Mario Rossi or enter a new record using the existing Mario Rossi.

I think maybe explain how your list and elements are setup.
 
I thought it was quite a common thing.
However, you should do a check.

Consider for example a hotel room.
The customer name is Mario Rossi (dbjoin). The receptionist checks if you have ever booked. If yes, you use the existing one, else puts as a new customer.
 
I resume the thread hoping to simplify
I just wish that fabrik scrutiny as to whether a customer is already present checking the name, surname and date of birth.
If yes it give me a simple message "already present". It's possible?
 
It's in the dbjoin element:
You can set your dbjoin label to concat name, surname, date of birth so the receptionist can see all this infos in the dropdown.

Then in the "Add option in frontend" part enable "Add option in frontend", so you can add new entries to your list the dbjoin is pointing to

Additionally you can enable "Frontend Select" to get the dbjoin list in a popup where you can filter and select a record
 
thanks for the fast response, but
where and how can i set dbjoin label to concat name, surname, date of birth?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top