Forum und email

mysql_field_table

(PHP 4, PHP 5, PECL mysql:1.0)

mysql_field_table — 특정 필드가 속한 테이블명을 얻음

설명

string mysql_field_table ( resource $result , int $field_offset )

특정 필드가 속한 테이블명을 반환한다.

매개변수

result

mysql_query() 호출을 통한 결과 resource.

field_offset

The numerical field offset. The field_offset starts at 0. If field_offset does not exist, an error of level E_WARNING is also issued.

반환값

성공하면 테이블명을 반환.

예제

Example#1 A mysql_field_table() 예제

<?php
$result 
mysql_query("SELECT name,comment FROM people,comments");
if (!
$result) {
    echo 
'Could not run query: ' mysql_error();
    exit;
}

// Assuming name is in the people table
$table mysql_field_table($result'name');
echo 
$table// people
?>

주의

Note: 하위 호환을 위하여, 다음의 권장하지 않는 alias를 사용할 수 있습니다: mysql_fieldtable()