Search found 590 matches

by phaworth
Thu Sep 01, 2016 3:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Unicode in Fields and SQLite
Replies: 12
Views: 1353

Re: Unicode in Fields and SQLite

If you are using lc7 or later, all you need to do is textencode your data on the way in to the database and textdecode when selecting it. LC does "just work"with unicode within it's own environment but when you write out to or read in from an external source, the encoding/decoding is necessary. It i...
by phaworth
Thu Jun 30, 2016 12:15 am
Forum: Using Externals and Plugins
Topic: New version of lcStackbrowser available
Replies: 0
Views: 539

New version of lcStackbrowser available

Version 2.2.3 of lcStackbrowser is now available for download at www.lcsql.com/lcstackbrowser.html. The release notes are available at https://goo.gl/Xg6gpC lcStackbrowser is a plugin alternative to the Livecode IDE Application Browser, Project Browser, and Tools palette and is compatible with Livec...
by phaworth
Thu Apr 21, 2016 8:10 pm
Forum: Talking LiveCode
Topic: SQL Lite query does not give me expected results
Replies: 2
Views: 325

Re: SQL Lite query does not give me expected results

I'm guessing that you have nulls in some of your rows, judging by the message box display. If that's a permissible data condition, try adding a check for not null to the where statement.
by phaworth
Sat Apr 09, 2016 12:43 am
Forum: Databases
Topic: The infamous POS app
Replies: 21
Views: 2675

Re: The infamous POS app

OK, that makes things clearer: Inventory table = one row per inventory item salesReceipts = one row per sale per item repairReceipts = one row per return per item What I don't see is a table for items booked into inventory, either as a result of buying them or manufactured by the company. Or maybe I...
by phaworth
Thu Apr 07, 2016 8:25 pm
Forum: Databases
Topic: The infamous POS app
Replies: 21
Views: 2675

Re: The infamous POS app

I haven't tried worldpay but have heard good things about it. I've only used stripe in a web application but I'm pretty sure you could use it from Livecode by using the Post command to access their API. Definitely use foreign keys. Assuming you had a column named ItemID in each table that hold the p...
by phaworth
Thu Apr 07, 2016 2:52 am
Forum: Databases
Topic: The infamous POS app
Replies: 21
Views: 2675

Re: The infamous POS app

Yes and +1 for using the database to do the check. That guarantees that no matter what program inserts data (your app or an SQL admin program), no duplicate barcodes can get in.
Pete
by phaworth
Wed Apr 06, 2016 8:31 pm
Forum: Databases
Topic: The infamous POS app
Replies: 21
Views: 2675

Re: The infamous POS app

Yes, sounds good to me.
Pete
by phaworth
Wed Apr 06, 2016 5:52 pm
Forum: Databases
Topic: The infamous POS app
Replies: 21
Views: 2675

Re: The infamous POS app

I'd have to make some assumptions about your table structures to answer that. If your inventory table has an entry for each action that causes the inventory to increase or decrease, it's pretty easy. Let's say the columns in it are: ItemID (a foreign key to your items table) Quantity (positive for a...
by phaworth
Tue Apr 05, 2016 8:31 pm
Forum: Databases
Topic: The infamous POS app
Replies: 21
Views: 2675

Re: The infamous POS app

I don;t quite have your db schema figured out, but one comment on the available quantity of an item. If you try to maintain that as a field somewhere adjusted by incoming inventory and purchased quantities, you will almost certainly run into issues where it is wrong. The best way to do this using go...
by phaworth
Mon Mar 21, 2016 8:32 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 1251

Re: Getting correct result from database using counter

Did you change your SELECT statement? The one you posted had zindex as the 4th item in each data line, not the first. I can't spot anything wrong with your repeat loop and where you increment the counter, very strange. I'd be willing to take a look at this if you are able to send me your stack, data...
by phaworth
Sun Mar 20, 2016 1:06 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 1251

Re: Getting correct result from database using counter

OK, the SQL looks fine. If you set a breakpoint right after the line "put item 4 of tLine..." and look at the tLocArray variable, what do you see? From your description, there should be two main elements (1 and 2) each containing Address, Latitude,Longitude, and zIndex keys with whatever values they...
by phaworth
Fri Mar 18, 2016 8:36 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Regular expressions in SQL in LC
Replies: 1
Views: 170

Re: Regular expressions in SQL in LC

Can't help on the compile part of the question but you can use the SQLite load_extension function to dynamically load extension libraries.
Pete
by phaworth
Fri Mar 18, 2016 8:31 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Getting correct result from database using counter
Replies: 20
Views: 1251

Re: Getting correct result from database using counter

You need to supply more information to help debug this, specifically your database schema and the SELECT statement you are using to get the data. Hard to tell what the problem is without that.
Pete
by phaworth
Mon Mar 14, 2016 8:28 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: SQLite and Unicode
Replies: 4
Views: 465

Re: SQLite and Unicode

Don't forget to textEncode any data you INSERT or UPDATE into the database.
Pete
by phaworth
Wed Mar 09, 2016 9:02 pm
Forum: Databases
Topic: MySQL Query
Replies: 4
Views: 512

Re: MySQL Query

put "SELECT rowid FROM Logininfo WHERE Username=:1 AND Password=:2" into theUsers put revDataFromQuery(,,gConnectionID,theUsers,"tUserName","tUserPassword") into theUserList If theUSerList is empty, there is no matching entry for the username/password. If it is an integer, there is a matching entry...

Go to advanced search