Nice example Gary...pretty clean.  But...could I be so bold as to recommend you 
complete it with BUSY and LOCKED possibilities?  Man will likely use your code 
as-is.
 
I remember a long time ago seeing some examples in a computer programming book 
by Knuth or such in my college classes.  Along with the example was the 
statement "this is far from optimal".  And yet...you could find that code in so 
many places being used to write lousy software.
 
So I'm a HUGE fan of "complete" examples so that others don't abuse the code.
 
Thanks a lot for the effort to 'splain things...
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 

________________________________

From: sqlite-users-boun...@sqlite.org on behalf of Gary Briggs
Sent: Sun 5/30/2010 7:29 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Simple Sample Code [Linked]



Heya All,

I've been a long-time lurker on the irc channel, helping where I can.
One question that constantly pops up is "what's the sqlite equivalent of
mysql_real_escape_string?"

One doesn't like to necessarily answer that particular question as
posed, so up until now I've been explaining each time how to use
prepare->bind->step; the examples on the wiki either don't
demonstrate the point [http://www.sqlite.org/cvstrac/wiki?p=SimpleCode],
or are a lot more complex than necessary
[http://www.sqlite.org/cvstrac/wiki?p=SampleCode]

I've written what I think is a lot simpler/clearer example here:
http://icculus.org/~chunky/stuff/sqlite3_example/sqlite3_example_bind.c

That code pretty much answers 3/4 of the questions I regularly see on IRC.

Not sure if that's really of interest to anyone, but if it is, great!

Thanks,
Gary (-;
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to