PDA

View Full Version : How do sqlite consultations in the form:


homes
03-22-2008, 02:19 PM
SQuery = "SELECT * WHERE from Phonebook (the first 20 entries);
or SQuery = "SELECT * WHERE from Phonebook (of 20 in 20);

Dermot
03-22-2008, 03:18 PM
Get the first 20 records:
SQuery = "SELECT * FROM Phonebook Limit 0,20"

Get the next 20 records:
SQuery = "SELECT * FROM Phonebook Limit 20,20"

Get the next 20 records:
SQuery = "SELECT * FROM Phonebook Limit 40,20"

The first number after Limit is the offset or the number of records to skip at the beginning of the table. The second number is the number of records to return. This comes in handy when you want to page through records 20 or so at a time. You would just use variables for the offset and limit.

homes
03-22-2008, 04:04 PM
Thanks .. I thank you for your help

homes
03-22-2008, 04:19 PM
Thanks .. I thank you for your help

Also in this way:
sUsersQuery = "Select *from Question WHERE (entryid <"..nRecordID..")";

rexzooly
03-23-2008, 03:34 AM
just a Question about this say if you just have a standard DB for a AMS progarm what stoped a hacker interjecting the DB?

Dermot
03-23-2008, 03:51 AM
just a Question about this say if you just have a standard DB for a AMS progarm what stoped a hacker interjecting the DB?

Not sure what that has to do with this. Also not sure what you mean by "standard DB". If you mean SQLite then anyone that has any tool that can read and write an SQLite database can view and edit data. That's the same for most databases unless they have the ability to password protect them.

rexzooly
03-23-2008, 05:09 AM
Not sure what that has to do with this. Also not sure what you mean by "standard DB". If you mean SQLite then anyone that has any tool that can read and write an SQLite database can view and edit data. That's the same for most databases unless they have the ability to password protect them.

well its was SQlite like i was on about i didn't see the need to restat a new post when there was one already one about SQlite running i know theres ways to stop people interjecting mysql data bases just wonders if there is for SQlite


sorry if i have pushed in anyway but it dose call under SQlite and i didn't want
a pointless post so i thought it best to ask here.