database

Develop software to help the small bookshop owner to catalog & sell online.

New Project started 2021
Post Reply
User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:
database

Post by Stevyn » Thu Apr 22, 2021 3:13 pm

create new database

Code: Select all

?php
$servername = "localhost";
$username = "username";
$password = "password";

// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
  die("Connection failed: " . $conn->connect_error);
}

// Create database
$sql = "CREATE DATABASE myDB";
if ($conn->query($sql) === TRUE) {
  echo "Database created successfully";
} else {
  echo "Error creating database: " . $conn->error;
}

$conn->close();
?>
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:

Re: database

Post by Stevyn » Thu Apr 22, 2021 3:14 pm

table for books

id
isbn
title
author
description
price
shelf location
picture 1
picture 2
condition
paperback/hardcover
date aded
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

Post Reply