
Làm cho tôi bài lập trình này?
đoạn code sau tôi đặt tên là database.php
function database()
{
$this->_connection =
@mysql_connect('localhost','root','root');
if(!$this->_connection){
die("khong the ket noi mysql");
}
$db='ql_ban_sua';
if($db !='' && !mysql_select_db(
$db, $this->_connection))
{
die("khong the mo csdl $db:
".mysql_error());
}
}
?>
đoạn code này sai ở dòng nào
đoạn code sau có kế thừa được với đoạn code database.php không
include_once('database.php');
class xl_hang_sua extends database
{
function danh_sach_hang_sua()
{
$this->setquery('select * from hang_sua');
$result = $this->loadallrow();
$this->disconnect();
return $result;
}
}
?>
tại sao khi tôi chạy toàn báo lỗi
tôi muốn tạo một menu lấy dữ liệu từ trong database
Chưa có câu trả lời nào. Bạn hãy là người đầu tiên!