Phillip Ward Wrote:
-------------------------------------------------------
>
Quote
I am parsing a string by delimiter into
> tags and storing them via trigger
> IIRC, a Trigger is a kind of procedure and can use
> the same, procedural constructs.
It is and loop works nicely there, i was just developing script via query. Are there different engines processing SP and queries?
>
Quote
Decided it would be better to do it on db
> level rather then php side
> Maybe, maybe not.
> What happens if you're "missing" bits of the input
> string? Too few delimiters? Too many? What are
> you going to
do about it?
Well, i am going to make full scale validation on js level and mirroring it to constrains on the db level.
> In a trigger, all you can do is throw an error and
> have the insert/ update fail. In a PHP
> application, you have all sorts of options for
> telling the user what went wrong (and, even, what
> to do about it).
I prefer doing it without reloading page and risking field values to vanish in some browsers.
> If this data is being read from, say, a file or
> other, system-generated/ stored source, then
> pushing that work into the database is probably a
> good choice. If, on the other hand, this data is
> entered [manually] by a user, I would strongly
> recommend doing the parsing in PHP and then giving
> the database "sensible" data to work with.
Thank you for advice! I am just starting with php ) and overall i like having maximum functionality on db level.
>
> Regards, Phill W.