rtstring mysql_field_table ( resource result, int field_offset )
我用例子测试了,result这个参数接受select语句的,那不就是select from 表名吗?那无论field_offset是多少都输出该表名的啊。那这个参数有什么用?
我用例子测试了,result这个参数接受select语句的,那不就是select from 表名吗?那无论field_offset是多少都输出该表名的啊。那这个参数有什么用?
当出现join的时候这个偏移量的作用就体现了
$con = mysql_connect("localhost", "hello", "321");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}$db_selected = mysql_select_db("test_db",$con);$sql = "SELECT * from Person";
$result = mysql_query($sql,$con);$table = mysql_field_table($result, 0);echo $table;mysql_close($con);
?>
数据库这块,一直使用框架提供的接口来处理的,说真的够用了。就没有再花时间去折腾细节了~