Hello, and thank you for this excellent forum!
I have been using PHP and Mysqli.
I have following problem:
<?php
$conn = mysqli_connect("localhost", "root", "");
$crea = "CREATE DATABASE IF NOT EXISTS baza";
// if(mysqli_query($conn, $crea)){
// echo "Database created successfully";
// } else{
// echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
// };
$sql = "CREATE TABLE IF NOT EXISTS 'korisnici' (
'id' INT(11) NOT NULL AUTO_INCREMENT,
'email' varchar(64) NOT NULL,
'sifra' varchar(64) NOT NULL,
'ime' varchar(64) NOT NULL,
'telefon' varchar(24) NOT NULL,
'profilna_s' varchar(24) NOT NULL,
PRIMARY KEY('id')
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1";
mysqli_query($sql);
// $drop = 'DROP DATABASE baza';
mysqli_close($conn);
?>
How to successfully make table inside database ?
mysqli_query() expects at least 2 parameters, line .........mysqli_query($sql);
Thank you.