도배 죄송합니다. 아래팁과 연관된 함수들을 여기에 올립니다.

· 19년 전 · 1785
<?php

function db_connect()
{

global $mysql_host;
global $mysql_user;
global $mysql_password;
global $mysql_db;

$result = new mysqli($mysql_host,$mysql_user,$mysql_password,'pkgtest');
if (!$result)
return false;
$result->autocommit(TRUE);
return $result;
}
function cat_all($mta)
{
// 테이터베이스에 원하는 숫자를 불러온다
$conn = db_connect();
$query = $mta;
$result = @$conn->query($query);
if (!$result)
return false;
$num_cats = @$result->num_rows;
if ($num_cats ==0)
return false;
$result = db_array($result);
return $result;
}

function db_array($result)
{
$res_array = array();
for ($count=0; $row = $result->fetch_assoc(); $count++)
$res_array[$count] = $row;

return $res_array;
}
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
19년 전 조회 3,722
19년 전 조회 3,266
19년 전 조회 3,526
19년 전 조회 3,224
19년 전 조회 6,111
19년 전 조회 3,069
19년 전 조회 3,155
19년 전 조회 2,366
19년 전 조회 2,249
19년 전 조회 1,786
19년 전 조회 2,943
19년 전 조회 2,591
19년 전 조회 3,017
19년 전 조회 1,923
19년 전 조회 1,897
19년 전 조회 2,628
19년 전 조회 8,690
19년 전 조회 6,127
19년 전 조회 3,451
19년 전 조회 6,579
🐛 버그신고