<html>
<?
include "lib.php";
$connect = dbconn();
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>조회</title>
<link rel=StyleSheet HREF=style.css type=text/css>
</head>
<div align=center>
<table width=600 border=1>
<tr>
<td>날짜
<td>이름
<td>나이
<td>주소
<?
$query = "select * from table1";
$res = mysql_query($query);
while($rowdata = mysql_fetch_array($res)) {
?>
...
이렇게 했는데
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
/public_html/web/list.php on line 26
에러가 납니다.
참고로 lib.php 는
<?
function dbconn() {
$connect = mysql_connect("localhost","userid","password");
mysql_select_db("sample_db",$connect);
return $connect;
}
?>
입니다.
어제부터 아무것도 못하고 있습니다..
답변 학수고대 하겟습니다.
<?
include "lib.php";
$connect = dbconn();
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>조회</title>
<link rel=StyleSheet HREF=style.css type=text/css>
</head>
<div align=center>
<table width=600 border=1>
<tr>
<td>날짜
<td>이름
<td>나이
<td>주소
<?
$query = "select * from table1";
$res = mysql_query($query);
while($rowdata = mysql_fetch_array($res)) {
?>
...
이렇게 했는데
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
/public_html/web/list.php on line 26
에러가 납니다.
참고로 lib.php 는
<?
function dbconn() {
$connect = mysql_connect("localhost","userid","password");
mysql_select_db("sample_db",$connect);
return $connect;
}
?>
입니다.
어제부터 아무것도 못하고 있습니다..
답변 학수고대 하겟습니다.
댓글 2개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기