I am developing a PHP-mysql database. It is noted that when the
browser window is refreshed the data is inserted again in the
database. unfortunately there is no unique keys that I can use to
verify the existance of the data, so as to prevent the multiple
insertion.
You should set some validation rules for your Model, and setup a
custom rule to check whether the submitted data is already in the
database, OR implement Model::beforeSave()
Hope that helps,
dr. H.
--~--~-~--~~~---~--~~
You received this message because you are
i am validating the data b4 inserting. but the data type is text..
the text will not be unique...
explain me clearly...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this
You should use the redirect after post pattern, using a HTTP 302 or
303 status code after saving your fields.
if($this-Model-save())
$this-redirect($url, $code, $exit);
On Dec 11, 12:58 pm, chowdary [EMAIL PROTECTED] wrote:
i am validating the data b4 inserting. but the data type is
Well, it's hard to provide an answer like this..
Can you paste some code and explain to us what are trying to achieve?
If you're inserting text and there is something else that needs to be
unique, you will need a custom validation rule for your Model.
On Dec 11, 12:58 pm, chowdary [EMAIL