Mysql UNIQUE and .lc server scripts?
Mark Schonewille
m.schonewille at economy-x-talk.com
Thu May 8 19:44:06 EDT 2014
Hi John,
After executing a MySQL command with revExecuteSQL, the result contains
either an error or an integer. If the result is an error, then you know
that the change couldn't be made and 0 records were affected. If the
result is an integer, then you need to check that the integer is greater
than 0. If it isn't, something may have gone wrong and 0 records were
affected.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Installer Maker for LiveCode:
http://qery.us/468
Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi
LiveCode on Facebook:
https://www.facebook.com/groups/runrev/
On 5/9/2014 01:18, JOHN PATTEN wrote:
> Hi All,
>
> I’m using some .lc server scripts to add records to a database from an app. My database has one field that is UNIQUE. Is it possible to capture the mySQL message and report it back to the app when text entered for specific field is not unique?
>
> The database won’t create the record due to the fact that the filed is not unique, but it also does not give the user any clue of this fact.
>
> Thank you!
> John Patten
More information about the use-livecode
mailing list