-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Apoorva Singh edited this page Jun 22, 2017
·
11 revisions
When you will start using graphDB for the first time you need to setup the tables in your MySQL database for the same. To do that initial work for you, we have created a function called setupTables($conn)
which creates all the tables if they don't already exist in the database.
require "graphDB.php";
function setupTables($conn) {
...
}
This function sets up the required tables in the selected database. A mysqli connection object should be passed to the function with the database already selected. For example,
require "graphDB.php";
$conn = mysqli_connect("localhost","root","pass","MyDB");
$out = setupTables($conn);
if($out=="ok") {
echo "Tables created successfully.";
}
else {
echo "Error in creating tables.";
}
Here is the list of all functions present in this library.
This function creates all the tables required for storing graph data.
Parameters
- $conn - A mysqli connection object with the database already selected. Returns
- A string "ok" if the tables were created successfully.