diff options
| author | Georg Richter <georg@php.net> | 2003-12-16 08:18:31 +0000 |
|---|---|---|
| committer | Georg Richter <georg@php.net> | 2003-12-16 08:18:31 +0000 |
| commit | 317e4b0d90fb6c780b21f0bd6e0d5efd1c743957 (patch) | |
| tree | 311ad5789b5981094ceed222b4b0f34434d23afa /ext/mysqli | |
| parent | 04611c1287b490f957ced55f8be912986a5d6d68 (diff) | |
| download | php-git-317e4b0d90fb6c780b21f0bd6e0d5efd1c743957.tar.gz | |
added properties
- insert_id
- server_status
fixed bug in mysqli_execute (report func)
Diffstat (limited to 'ext/mysqli')
| -rw-r--r-- | ext/mysqli/mysqli_api.c | 4 | ||||
| -rw-r--r-- | ext/mysqli/mysqli_fe.c | 2 | ||||
| -rw-r--r-- | ext/mysqli/mysqli_prop.c | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index cd5bf9bc4e..ca32c748a9 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -620,6 +620,10 @@ PHP_FUNCTION(mysqli_execute) MYSQLI_REPORT_STMT_ERROR(stmt->stmt); RETURN_FALSE; } + if (MyG(report_mode) & MYSQLI_REPORT_INDEX) { + php_mysqli_report_index(stmt->stmt->query, stmt->stmt->mysql->server_status TSRMLS_CC); + } + RETURN_TRUE; } /* }}} */ diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index 62a88a5f6d..f801827340 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -172,7 +172,6 @@ function_entry mysqli_link_methods[] = { PHP_FALIAS(get_server_info,mysqli_get_server_info,NULL) PHP_FALIAS(init,mysqli_init,NULL) PHP_FALIAS(info,mysqli_info,NULL) - PHP_FALIAS(insert_id,mysqli_insert_id,NULL) PHP_FALIAS(kill,mysqli_kill,NULL) PHP_FALIAS(master_query,mysqli_master_query,NULL) PHP_FALIAS(mysqli, mysqli_connect, NULL) @@ -242,6 +241,7 @@ function_entry mysqli_stmt_methods[] = { PHP_FALIAS(get_metadata, mysqli_get_metadata,NULL) PHP_FALIAS(num_rows, mysqli_stmt_num_rows,NULL) PHP_FALIAS(send_long_data,mysqli_send_long_data,NULL) + PHP_FALIAS(stmt,mysqli_prepare,NULL) PHP_FALIAS(store_result,mysqli_stmt_store_result,NULL) {NULL, NULL, NULL} }; diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index cfb2fa2c91..1cd61ced5f 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -76,10 +76,12 @@ MYSQLI_MAP_PROPERTY_LONG(link_field_count_read, MYSQL, field_count); MYSQLI_MAP_PROPERTY_STRING(link_host_read, MYSQL, host); MYSQLI_MAP_PROPERTY_STRING(link_host_info_read, MYSQL, host_info); MYSQLI_MAP_PROPERTY_STRING(link_info_read, MYSQL, info); +MYSQLI_MAP_PROPERTY_LONG(link_insert_id_read, MYSQL, last_used_con->insert_id); MYSQLI_MAP_PROPERTY_LONG(link_port_read, MYSQL, port); MYSQLI_MAP_PROPERTY_LONG(link_protocol_version_read, MYSQL, protocol_version); MYSQLI_MAP_PROPERTY_LONG(link_server_capabilities_read, MYSQL, server_capabilities); MYSQLI_MAP_PROPERTY_LONG(link_server_language_read, MYSQL, server_language); +MYSQLI_MAP_PROPERTY_LONG(link_server_status_read, MYSQL, server_status); MYSQLI_MAP_PROPERTY_STRING(link_server_version_read, MYSQL, server_version); MYSQLI_MAP_PROPERTY_STRING(link_sqlstate_read, MYSQL, net.sqlstate); MYSQLI_MAP_PROPERTY_LONG(link_thread_id_read, MYSQL, thread_id); @@ -148,7 +150,9 @@ mysqli_property_entry mysqli_link_property_entries[] = { {"host", link_host_read, NULL}, {"host_info", link_host_info_read, NULL}, {"info", link_info_read, NULL}, + {"insert_id", link_insert_id_read, NULL}, {"server_capabilities", link_server_capabilities_read, NULL}, + {"server_status", link_server_status_read, NULL}, {"server_version", link_server_version_read, NULL}, {"sqlstate", link_sqlstate_read, NULL}, {"port", link_port_read, NULL}, |
