Welcome visitor
* Login
* Register
It is currently March 18th, 2019, 3:26 pm
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Databases » SQLite



Post new topic Reply to topic  [ 4 posts ] 
Author Message
  Pulling SQLite data from teh db with html5 and javascript.
PostPosted: June 25th, 2010, 3:43 am 

Posts: 2
Okay, probably pretty simple for those who know sqlite and html5 already...

I am trying to use javascirpt to pull data back out of my sqlite db, and show the results on the screen. Let me just start there. I can get into formatting later.

i have a db that I can open, and write data into the table I created. I have 5 fields, the 1st being the autonumber 'id' field. The rest I fill in, and submit them into the database.

Now I just want to create a simple SELECT * FROM Mydb, and print the results to the screen.

I have no idea how to do this correctly, particuarly in an html5 page using javascript.

Any help is greatly appreciated.

Brian


Top
 Profile  
 
  Re: Pulling SQLite data from teh db with html5 and javascript.
PostPosted: June 25th, 2010, 6:21 am 
User avatar

Posts: 21
JavaScript is a client-side language. For security reasons, client-side languages cannot have direct access to a database (this would imply passwords and other sensitive data to travel insecurely through the net). To pull information from a database (SQlite, MySQL, SQL, etc) you need to use a server-side language like PHP.

Once you have parsed that information from the database on the server, you can then send it to the client (your browser) and do all kinds of crazy stuff with JavaScript.

If you need more clarification on the difference between a client-side language and a server-side language, take a look at this good tutorial:

http://www.scriptingok.com/tutorial/Ser ... lient-side

Let me know if you have any other question.

REGARDS

_________________
IT. Consulting
www.tnogos.com


Top
 Profile  
 
  Re: Pulling SQLite data from teh db with html5 and javascript.
PostPosted: June 25th, 2010, 11:23 am 

Posts: 2
Okay, should have been more clear. This is a cached webapp for the iphone that I'm working on. I need to simply pull the data from the db with a select statement, and then be able to know where the data is so I can put it on the screen in the html5 code.

No need for security, because it's not going over a network or internet. For any security based parts will definitely use php.

Does that help...I know this can be done, I'm just not familiar with the format for doing it.

Thanks,

Brian


Top
 Profile  
 
  Re: Pulling SQLite data from teh db with html5 and javascript.
PostPosted: June 25th, 2010, 6:42 pm 
User avatar

Posts: 29
I know GEARS from Google allows you to do that on several desktop and mobile platforms. I'm not sure if the project includes iPhone. Why don't you give it a look?

http://code.google.com/apis/gears/

_________________
Ooh, I love your magazine. Especially the 'Enrich Your Wordpower' section. I think it's really...really... really...good.
- Homer Simpson


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

FORUMS » Databases » SQLite


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron