Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6469113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:57:13+00:00 2026-05-25T05:57:13+00:00

How can I use sqlite? What is the command when I want to use

  • 0

How can I use sqlite? What is the command when I want to use this:

SELECT * FROM table

? (I mean like PHP I need to use mysql_query("SELECT * FROM table");)

What is the command when I get a table with records and I want to dispart it? (in PHP: mysql_fetch_assoc() or mysql_fetch_array())

I used SELECT * FROM table in the table var and I dispart it. (The table has these columns: id, name, pass) How can I get the column values?

This is the connection in the Javascript to the database:

Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/FileUtils.jsm");

let file = FileUtils.getFile("ProfD", ["my_db_file_name.sqlite"]);
let mDBConn = Services.storage.openDatabase(file);

How can I create table (if it doesn’t exist), how can I SELECT, UPDATE, DELETE, ect.

How can I do this with javascript and sqlite:
example (its wrote in php, mysql):

mysql_connect("localhost","user","pass"); // pass if need
mysql_select_db("my_database");

mysql_query("CREATE TABLE `my_database`.`table` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,`nev` VARCHAR( 50 ) NOT NULL ,`pass` VARCHAR( 20 ) NOT NULL ,INDEX ( `nev` )) ENGINE = InnoDB HARACTER SET utf8 COLLATE utf8_unicode_ci;");

mysql_query("INSERT INTO table (name,pass) VALUES ('Peter','sdf')");

$query=mysql_query("SELECT * FROM table");
while($row=mysql_fetch_array($query)){
    echo $row['name'].' '.$row['pass']; // it write all record, like 'name pass' ('Peter sdf')
}

$row2=mysql_fetch_assoc(mysql_query("SELECT * FROM table WHERE id=1"));
echo $row2['name'].' '.$row2['pass']; // it write only 'Peter sdf'

mysql_query("DELETE FROM table WHERE id=1");

mysql_query("DROP TABLE 'table'");

mysql_close();

How can I do this in javascript with sqlite?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T05:57:14+00:00Added an answer on May 25, 2026 at 5:57 am

    You should use the Mozilla Storage API for working with SQLite databases. See https://developer.mozilla.org/En/Storage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd sort of like to use SQLite from within C#.Net, but I can't seem
I'd like to use SQLite FTS3 (FTS4, actually) to index a table with integer
What components can I use to use SQlite database with Delphi 6?
You can use SelectFolder() to get a folder or GetOpenFolderitem(filter as string) to get
I want to copy a row from a table in a database to an
I an attempting to use a SQLiteFunction from my C# and ADO.NET code. Can
When Rasmus Lerdorf will update sqlite_* functions here: http://php.net/manual/en/book.sqlite.php to use SQLite version 3?
Can I use SQLite's FTS3 when building for the iPhone and iPad?
I can connect to my android database using 'sqlite3' command. So I get a
I need to use Sqlite, but there's a problem with my syntax (well that's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.