MySQL Forums
Forum List  »  Newbie

Re: While Syntax
Posted by: John Silver
Date: July 20, 2016 06:25AM

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.

Options: ReplyQuote


Subject
Written By
Posted
July 19, 2016 04:42AM
July 19, 2016 05:35AM
July 20, 2016 02:45AM
July 20, 2016 05:14AM
Re: While Syntax
July 20, 2016 06:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.