Search found 24 matches

by Adrien
Sun Nov 15, 2015 4:25 am
Forum: Talking LiveCode
Topic: Validate a field content if it is a date
Replies: 16
Views: 4192

Re: Validate a field content if it is a date

Old topic but might help, To check if a string with the mm/dd/yy or mm/dd/yyyy format is a valid date, you can use: put "mm/dd/yy" into theDateToCheck convert theDateToCheck to seconds if theDateToCheck is an integer then -- has been translated into seconds answer "it is a date" else -- theDateToChe...
by Adrien
Wed Oct 28, 2015 12:57 pm
Forum: Off-Topic
Topic: Web Summit 2015 - Dublin
Replies: 0
Views: 1026

Web Summit 2015 - Dublin

Hi all,

In a couple days, the WebSummit will take place in Dublin (3-5 Nov), http://websummit.net

Will anyone be there, Livecoder enthusiast or staff?

I'll be there myself, presenting my work (social network mobile app) coded in LC of course.

I'd be happy to meet you there :)

Cheers!


Adrien
by Adrien
Wed Oct 28, 2015 12:16 pm
Forum: Android Deployment
Topic: Go to card slow
Replies: 10
Views: 2168

Re: Go to card slow

Check if the resizeQuality of the images are set to "good" or "normal"
It's ultra slow when set to "best"
by Adrien
Sun Aug 16, 2015 8:27 pm
Forum: Databases
Topic: Inserting string with special characters into MySQL field
Replies: 24
Views: 9812

Re: Inserting string with special characters into MySQL fiel

Strait from the dictionary: The revExecuteSQL command places a return value into the result, to indicate the outcome of the query. For successful queries, the revExecuteSQL command returns the number of rows affected for INSERT, UPDATE and DELETE statements. For all other statements, 0 is returned. ...
by Adrien
Sun Aug 16, 2015 2:24 pm
Forum: Databases
Topic: Inserting string with special characters into MySQL field
Replies: 24
Views: 9812

Re: Inserting string with special characters into MySQL fiel

Should have been:
revExecuteSQL the uDatabaseID of this stack, tSQLStatement, "SQLArray"

with quotes on the "SQLArray"

I edited my previous post, hope this is it...


Cheers,
by Adrien
Sun Aug 16, 2015 2:39 am
Forum: Databases
Topic: Inserting string with special characters into MySQL field
Replies: 24
Views: 9812

Re: Inserting string with special characters into MySQL fiel

Use prepared statements! -- before that... put quote & "blablabla" & quote into pDescription -- or single quotes "'"... use your functions -- put pDescription into SQLArray[1] -- or put quote & pDescription & quote instead of statement above.. you already have your two functions put pTarget_ID into ...
by Adrien
Fri Aug 14, 2015 9:08 pm
Forum: iOS Deployment
Topic: Multiple native input controls...
Replies: 10
Views: 4154

Re: Multiple native input controls...

Using LC 7.0.6, this is still the behavior with the "Done" key of a iOS native multiline field: it inserts "return" instead of sending a "focus on nothing". This snippet could be a work-around: on inputTextChanged if mobileControlTarget() is "theNativeMultilineFieldWithTheDoneKey" then -- we definit...
by Adrien
Fri May 22, 2015 2:23 am
Forum: Databases
Topic: Inserting string with special characters into MySQL field
Replies: 24
Views: 9812

Re: Inserting string with special characters into MySQL fiel

Hi, NOTE!! INSERT OR REPLACE is for SQLite, I read a bit fast, my bad. For MySQL, I think you want to use: INSERT .... ON DUPLICATE KEY UPDATE .... There is also the REPLACE INTO command in MySQL but, there's a big thing: it will delete then insert. This means, if you have an auto increment field, t...
by Adrien
Thu May 21, 2015 5:16 pm
Forum: Databases
Topic: Inserting string with special characters into MySQL field
Replies: 24
Views: 9812

Re: Inserting string with special characters into MySQL fiel

Hello, You want to prepare your SQL statements. This is an exemple: put "INSERT OR REPLACE INTO awesome_table (id_guy, id_thing, status) VALUES (:1, :2, :3)" into SQLiteQry put the guyID of this stack into SQLArray[1] put tThingID into SQLArray[2] put "Unkown, maybe?" into SQLArray[3] revExecuteSQL ...
by Adrien
Sun May 03, 2015 5:33 pm
Forum: Databases
Topic: SQLite - cross reference search
Replies: 18
Views: 3835

Re: SQLite - cross reference search

Have a look there: https://sqlite.org/lang_createtable.html in the column def -> column contraint -> foreign key clause you will see a "on delete cascade" possibility. So here you have your MyFruit table and you CrossRef table. The CrossRef has a reference to the MyFruit table, and you chose to add ...
by Adrien
Thu Apr 30, 2015 11:23 pm
Forum: Databases
Topic: SQLite - cross reference search
Replies: 18
Views: 3835

Re: SQLite - cross reference search

I think Tom is looking for a "n to n" relationship, which I believe can only work with a mix table, or I'd need to learn something new here. However, in a "1 to n" relationship, you will only need two tables. To make sure this is clear, I will change the example to: songs and albums. So for your "1 ...
by Adrien
Thu Apr 30, 2015 10:54 am
Forum: Databases
Topic: SQLite - cross reference search
Replies: 18
Views: 3835

Re: SQLite - cross reference search

One for querying the fruitNames in a basket based upon the BasketID. I think this should be : put fld “Basket_ID” into tBasketID put "SELECT MyFruit.FruitName FROM CrossRef INNER JOIN MyFruit USING (FruitID) WHERE CrossRef.BasketID = :1 GROUP BY CrossRef.BasketID" into tSQLStatement put revDataFrom...
by Adrien
Wed Apr 29, 2015 10:42 pm
Forum: Databases
Topic: SQLite - cross reference search
Replies: 18
Views: 3835

Re: SQLite - cross reference search

Any x object can be consumed or occur in any y object but only once in each y object. which is Each object X can be linked to any object Y, but no more than twice to the same object Y the missing data is: can one object X be linked to two or more different objects Y? and the opposite: can one objec...
by Adrien
Wed Apr 29, 2015 7:53 am
Forum: Databases
Topic: SQLite - cross reference search
Replies: 18
Views: 3835

Re: SQLite - cross reference search

Glad it helps, and don't worry about repliyng ASAP. We all have busy times :) You surely know the SQLite website, and more precisely its syntax page : http://www.sqlite.org/lang.html Which I find very usefull, I often go there to remember my syntax, and it's mostly good for MySQL too! If you need a ...
by Adrien
Tue Apr 28, 2015 11:07 pm
Forum: Databases
Topic: SQLite - cross reference search
Replies: 18
Views: 3835

Re: SQLite - cross reference search

A "1 to n" relationship can be understood as the following: - each basket has an unique identifier - each fruit has an unique identifier - a basket may contain multiple fruits at once - a fruit may be contained in an existing basket and if so, in only one basket For this, you would need the followin...

Go to advanced search