Re: [android-developers] rawQuery selection args?
Well, it's broken. I fed it a String like this "My random \" string with weird \' chars" and it blew up.
On Tuesday, December 21, 2010 11:38:00 AM UTC-8, Mark Murphy wrote:
String[] args={"somebaldingguy"};--
rawQuery("SELECT _id, title FROM books WHERE author=?", args);The string array elements replace the question mark placeholders.
SQLite handles quotation rules for strings for you, so you do not have
to worry about embedded quotes or apostrophes.On Tue, Dec 21, 2010 at 2:34 PM, Tobiah <to...@tobiah.org> wrote:
> I am unable to find an example of how to use the 'selection args' in the
> second argument to rawQuery:
>
> public Cursor rawQuery (String sql, String[] selectionArgs)
>
> Can someone explain what they would be for and how to use them?
>
> Thanks,
>
> Tobiah
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
Available!
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home