Re: [sqlite] Deprecated OSX functioon

2017-02-16 Thread James Walker

On 2/16/2017 7:40 AM, Ward WIllats wrote:

This has been coming across my console when building Sqlite since upgrading to 
Mac OSX Sierra a few months ago. FWIW.


Building sqlite3 shell...
sqlite3.c:20839:17: warning: 'OSAtomicCompareAndSwapPtrBarrier' is deprecated: first 
deprecated in macOS 10.12 - Use atomic_compare_exchange_strong() from 
 instead [-Wdeprecated-declarations]
  success = OSAtomicCompareAndSwapPtrBarrier(NULL, newzone,
^
/usr/include/libkern/OSAtomicDeprecated.h:547:6: note: 
'OSAtomicCompareAndSwapPtrBarrier' has been explicitly marked deprecated here
boolOSAtomicCompareAndSwapPtrBarrier( void *__oldValue, void *__newValue, 
void * volatile *__theValue );
^
1 warning generated.


For what it's worth, the OS header recommends replacing it with the 
function atomic_compare_exchange_strong, which I assume refers to the 
C++11 template function.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] locating a minimum in SQLite 2

2016-12-01 Thread James Walker

On 12/1/2016 11:55 AM, Baruch Burstein wrote:

On Thu, Dec 1, 2016 at 9:12 PM, James Walker <jam...@frameforge3d.com>
wrote:


Let's say I have a table INFO with columns PRICE and IDENT, and I want to
find the IDENT of the row with the minimum value of PRICE.  In SQLite 3, I
can say

SELECT MIN(PRICE), IDENT FROM INFO;

and get what I want.  But in SQLite 2 (legacy code), this doesn't work...
I get the minimum value, but NULL in the IDENT column.  I could say

SELECT PRICE, IDENT FROM INFO ORDER BY PRICE;

and ignore all but the first row of the result, but I'm sure there must be
a better way?



LIMIT 1?


Yes, LIMIT 1 does it. I knew there had to be a simple way.  Thanks.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] locating a minimum in SQLite 2

2016-12-01 Thread James Walker
Let's say I have a table INFO with columns PRICE and IDENT, and I want 
to find the IDENT of the row with the minimum value of PRICE.  In SQLite 
3, I can say


SELECT MIN(PRICE), IDENT FROM INFO;

and get what I want.  But in SQLite 2 (legacy code), this doesn't 
work... I get the minimum value, but NULL in the IDENT column.  I could say


SELECT PRICE, IDENT FROM INFO ORDER BY PRICE;

and ignore all but the first row of the result, but I'm sure there must 
be a better way?

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] syntax error on SELECT with WHERE EXISTS

2016-01-18 Thread James Walker
On 1/18/2016 1:59 PM, R Smith wrote:
>
>
> On 2016/01/18 11:42 PM, James Walker wrote:
>> Why do I get a syntax error from this SQL?
>>
>> SELECT * FROM SnappedFrames WHERE EXISTS (SELECT 1 FROM
>> FilmSizeOverrides);
>>
>> SQLite says the error is near SELECT, but doesn't say which SELECT. If
>> I say either
>
> It works fine for me - What version of SQLite do you have?
> SELECT sqlite_version();

Aha, thanks, that's probably my problem.  It's SQLite 2.8.17.  Legacy 
code.  I forgot that I wasn't using SQLite 3, or I would have mentioned it.

> Are either of SnappedFrames or FilmSizeOverrides perhaps views rather
> than tables? If not, care to post the schema for the tables?
 >
> What type of program do you use for the SQL - the command-line interface
> or some DB management tool, or is this via your own code perhaps?


Originally my own code, but I did some testing in "Navicat for SQLite Lite".


[sqlite] syntax error on SELECT with WHERE EXISTS

2016-01-18 Thread James Walker
Why do I get a syntax error from this SQL?

SELECT * FROM SnappedFrames WHERE EXISTS (SELECT 1 FROM FilmSizeOverrides);

SQLite says the error is near SELECT, but doesn't say which SELECT.  If 
I say either

SELECT * FROM SnappedFrames WHERE 1;

or

SELECT 1 FROM FilmSizeOverrides;

then there's no error.


Re: [sqlite] Suggests for improving the SQLite website

2007-11-14 Thread James Walker

Jarl Friis wrote:

[EMAIL PROTECTED] writes:


I put up 4 variations.  Please, everyone, offer your opinions:

   (1) http://sqlite.hwaci.com/v1/ No CSS of any kind.
   (2) http://sqlite.hwaci.com/v2/ CSS menus with rounded corners
   (3) http://sqlite.hwaci.com/v3/ CSS menus with square corners
   (4) http://sqlite.hwaci.com/v4/ CSS font specification only

(2) and (3) do not work on IE6.  (1) has ugly fonts, I am told.
That leaves me with (4).  


(2) and (3) are rendered imperfect on Konqueror as well, and therefore
probably also on Safari (on Mac) since they are based on the same HTML
render engine (KHTML). That experience is on Konqueror 3.5.7 that
renders the acid test
(http://www.webstandards.org/files/acid2/test.html) perfectly!!!

I prefer the look of (2), but the implementation may be reconsidered
due to the situation regarding Konqueror (and probably Safari as well)



Is (3) supposed to have drop-down menus?  I don't see any in Safari.  I 
do see drop-down menus in (2).


The only other problem I notice in Safari is the missing-image icon for 
SQLite.gif.

--
  James W. Walker, Innoventive Software LLC
  

-
To unsubscribe, send email to [EMAIL PROTECTED]
-