我做了一個新表,一切正常。 CREATE TABLE IF NOT EXISTS logdata ( email varchar(30), password varchar(20), username varchar(15),)
插入ID自動遞增碼 ,以及一些數據:無法選擇插入的數據
INSERT INTO logdata(email,password,username,id) VALUES('[email protected]','testtest1','test',' ')
一切都在這裏工作。當我嘗試輸出數據時,我沒有得到任何結果(「ERROR」除外)。我不知道爲什麼。
<?php
error_reporting(E_ALL);
// here is where I set the connection , everything is working here
if(mysqli_connect_errno()){
echo "Could not connect to the database <br /><br />";
echo mysqli_connect_error();
exit();
}
$dostuff="SELECT * FROM logdata";
$query = mysqli_query($db_conn, $dostuff);
if($query == TRUE) {
echo "Succes!";
}
else{
echo "ERROR ";
echo mysqli_error($db_conn);
}
?>
有問題的錯誤消息是什麼? –
我的頭痛... ....錯誤信息說什麼? – Rottingham
你會得到什麼錯誤信息?什麼是'$ dostuff'?沒有更多信息,我們無法幫助您。 –