Post: HELP NEEDED- Sqlite3, opening a db
10-21-2011, 04:52 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); i am currently doing somethings with sql at school and was told to continue at home, i downloaded the slqite3 exe file which works fine. but how to i open the database file?
(adsbygoogle = window.adsbygoogle || []).push({});
10-21-2011, 04:59 AM #2
Originally posted by MAYZEBOY View Post
i am currently doing somethings with sql at school and was told to continue at home, i downloaded the slqite3 exe file which works fine. but how to i open the database file?


mysql lite?
10-22-2011, 03:45 AM #3
Default Avatar
Oneup
Guest
If you are trying to view the tables and such then I suggest this:
You must login or register to view this content.

That's currently what I use for work. No install and all you have to do is click open db and select your database
10-22-2011, 05:17 AM #4
Originally posted by MAYZEBOY View Post
i am currently doing somethings with sql at school and was told to continue at home, i downloaded the slqite3 exe file which works fine. but how to i open the database file?


well if it's mysql then after you create a database use this to login to the database.

name this database.php
    
<?php
$host=""; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name=""; // Database name
$tbl_name=""; // Table name

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
?>


then add this to any other files with php.

ex:

    
<?php require('/home/USER/public_html/database.php'Winky Winky; ?>
<?php

//your own coding here

?>
10-22-2011, 06:42 PM #5
Default Avatar
Oneup
Guest
Originally posted by River
well if it's mysql then after you create a database use this to login to the database.

name this database.php
    
<?php
$host=""; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name=""; // Database name
$tbl_name=""; // Table name

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
?>


then add this to any other files with php.

ex:

    
<?php require('/home/USER/public_html/database.php'Winky Winky; ?>
<?php

//your own coding here

?>


Though they are close, Sqllite and mysql arent the same thing
10-22-2011, 10:30 PM #6
Originally posted by UP View Post
Though they are close, Sqllite and mysql arent the same thing


dont matter though that's PHP it should work with both.

if not I'll find something
10-23-2011, 03:54 AM #7
I suggest using Microsoft SQL server 2008 its better as well as more up to date and its less bugy
10-23-2011, 05:54 AM #8
Epic?
Awe-Inspiring
Originally posted by River
dont matter though that's PHP it should work with both.

if not I'll find something


Lies! First off, he didn't even mention the use of PHP (solely of SQL). Second of all, MySQL and SQLite are not the same thing! PHP is not magical!

Read the description in the PHP manual "mysql_connect - Open a connection to a MySQL Server".

MySQL, SQLite, Microsoft SQL Server, PostgreSQL, Oracle (just to name a few) are all different relational database management systems, that means, they're not the same thing. PHP offers a built-in interface to MySQL, however its not cross compatible to other RDBMS.

---------- Post added at 10:54 PM ---------- Previous post was at 10:50 PM ----------

Originally posted by MAYZEBOY View Post
i am currently doing somethings with sql at school and was told to continue at home, i downloaded the slqite3 exe file which works fine. but how to i open the database file?


Just after some Googling, you might want to check out: You must login or register to view this content. and You must login or register to view this content. and refer to You must login or register to view this content..

To directly refer to your question, I don't really know exactly what you're asking and I don't really have much experience with SQLite (I think I used it once for some class a couple of years back), but to create a database, you should be able to execute the CREATE DATABASE statement.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo