mysqli查询

$result=$con->query($myquery);
记录数:$result->num_rows;
字段数:$result->field_count;
获取字段信息:$result->fetch_field;field信息如下:
Attribute Description
name The name of the column
orgname Original column name if an alias was specified
table The name of the table this field belongs to (if not calculated)
orgtable Original table name if an alias was specified
def The default value for this field, represented as a string
max_length The maximum width of the field for the result set.
flags An integer representing the bit-flags for the field.
type The data type used for this field
decimals The number of decimals used (for integer fields)
获取记录:$result->fetch->array();然后可用row[i],i<$result->field_count取之

posted by xiaohuiyan @ 16:42:00,

共 3 条评论:

At 2008年8月2日 16:56, Blogger xiaohuiyan said...

这个blog还不错,就是评论不好

 
At 2008年8月2日 16:56, Blogger xiaohuiyan said...

还要跳转到首页啊

 
At 2008年8月4日 10:26, Blogger xiaohuiyan said...

这个blog还不错,就是评论不好
这个blog还不错,就是评论不好
这个blog还不错,就是评论不好
这个blog还不错,就是评论不好这个blog还不错,就是评论不好
这个blog还不错,就是评论不好
这个blog还不错,就是评论不好
这个blog还不错,就是评论不好

 

发表评论

<< Home