240:
182:
68:
27:
2005:
data of a result sets into strings before sending. This conversion is done regardless of the SQL result set column data type. The MySQL client libraries receive all column values as strings. No further client-side casting is done to convert columns back to their native types. Instead, all values are provided as PHP strings.
2919:
The problem with persistent connections is that they can be left in unpredictable states by clients. For example, a table lock might be activated before a client terminates unexpectedly. A new client process reusing this persistent connection will get the connection "as is". Any cleanup would need to
2004:
The mysqli_query(), mysqli_real_query() and mysqli_multi_query() functions are used to execute non-prepared statements. At the level of the MySQL Client Server
Protocol, the command COM_QUERY and the text protocol are used for statement execution. With the text protocol, the MySQL server converts all
1127:
Statements can be executed with the mysqli_query(), mysqli_real_query() and mysqli_multi_query() functions. The mysqli_query() function is the most common, and combines the executing statement with a buffered fetch of its result set, if any, in one call. Calling mysqli_query() is identical to calling
2363:
It is possible to convert integer and float columns back to PHP numbers by setting the MYSQLI_OPT_INT_AND_FLOAT_NATIVE connection option, if using the mysqlnd library. If set, the mysqlnd library will check the result set meta data column types and convert numeric SQL columns to PHP numbers, if the
1371:
After statement execution results can be retrieved at once to be buffered by the client or by read row by row. Client-side result set buffering allows the server to free resources associated with the statement results as early as possible. Generally speaking, clients are slow consuming result sets.
641:
Users migrating from the old MySQL extension may prefer the procedural interface. The procedural interface is similar to that of the old MySQL extension. In many cases, the function names differ only by prefix. Some MySQLi functions take a connection handle as their first argument, whereas matching
2912:
Persistent connection support was introduced in PHP 5.3 for the MySQLi extension. Support was already present in PDO MYSQL and ext/mysql. The idea behind persistent connections is that a connection between a client process and a database can be reused by a client process, rather than being created
2886:
A MySQL result set contains metadata. The metadata describes the columns found in the result set. All metadata sent by MySQL is accessible through the MySQLi interface. The extension performs no or negligible changes to the information it receives. Differences between MySQL server versions are not
2955:
The automatic cleanup feature has advantages and disadvantages though. The advantage is that the developer no longer needs to worry about adding cleanup code, as it is called automatically. However, the disadvantage is that the code could potentially be a little slower, as the code to perform the
382:
The PHP code consists of a core, with optional extensions to the core functionality. PHP's MySQL-related extensions, such as the MySQLi extension, and the MySQL extension, are implemented using the PHP extension framework. An extension typically exposes an API to the PHP developer, to allow its
2768:
The prepared statement execution consists of two stages: prepare and execute. At the prepare stage a statement template is sent to the database server. The server performs a syntax check and initializes server internal resources for later use.
1874:
If client memory is a short resource and freeing server resources as early as possible to keep server load low is not needed, unbuffered results can be used. Scrolling through unbuffered results is not possible before all rows have been read.
2835:
Multiple statements or multi queries must be executed with mysqli_multi_query(). The individual statements of the statement string are separated by semicolon. Then, all result sets returned by the executed statements must be fetched.
1375:
PHP applications can navigate freely through buffered results. Navigation is fast because the result sets are held in client memory. Please, keep in mind that it is often easier to scale by client than it is to scale the server.
2864:
Transactions can either be controlled using SQL or API calls. It is recommended to use API calls for enabling and disabling the auto commit mode and for committing and rolling back transactions.
2916:
Unlike the MySQL extension, MySQLi does not provide a separate function for opening persistent connections. To open a persistent connection you must prepend p: to the hostname when connecting.
2798:. A stored procedure is a subroutine stored in the database catalog. Applications can call and execute the stored procedure. The CALL SQL statement is used to execute a stored procedure.
273:
2832:
MySQL optionally allows having multiple statements in one statement string. Sending multiple statements at once reduces client-server round trips but requires special handling.
78:
2861:
The MySQL server supports transactions depending on the storage engine used. Since MySQL 5.5, the default storage engine is InnoDB. InnoDB has full ACID transaction support.
2913:
and destroyed multiple times. This reduces the overhead of creating fresh connections every time one is required, as unused connections are cached and ready to be reused.
2804:
Stored procedures can have IN, INOUT and OUT parameters, depending on the MySQL version. The MySQLi interface has no special notion for the different kinds of parameters.
2760:
The MySQL database supports prepared statements. A prepared statement or a parameterized statement is used to execute the same statement repeatedly with high efficiency.
392:
The authors of the PHP scripting language recommend using MySQLi when dealing with MySQL server versions 4.1.3 and newer (takes advantage of new functionality).
821:
The MySQL server supports the use of different transport layers for connections. Connections use TCP/IP, Unix domain sockets or
Windows named pipes.
383:
facilities to be used programmatically. However, some extensions which use the PHP extension framework do not expose an API to the PHP developer.
400:
The MySQLi extension provides various benefits with respect to its predecessor, the most prominent of which (according to the PHP website) are:
2923:
The persistent connection of the MySQLi extension however provides built-in cleanup handling code. The cleanup carried out by MySQLi includes:
386:
The PDO MySQL driver extension, for example, does not expose an API to the PHP developer, but provides an interface to the PDO layer above it.
2839:
The MySQL server allows having statements that do return result sets and statements that do not return result sets in one multiple statement.
92:
of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be
828:
has a special meaning. It is bound to the use of Unix domain sockets. It is not possible to open a TCP/IP connection using the hostname
2949:
This ensures that persistent connections are in a clean state on return from the connection pool, before the client process uses them.
2920:
be done by the new client process before it could make good use of the persistent connection, increasing the burden on the programmer.
259:
3238:
309:
291:
221:
163:
54:
1372:
Therefore, it is recommended to use buffered result sets. mysqli_query() combines statement execution and result set buffering.
89:
638:
The MySQLi extension features a dual interface - it supports both the procedural and object-oriented programming paradigms.
2962:
Note: The MySQLi extension supports persistent connections when using either MySQL Native Driver or MySQL Client
Library.
2959:
It is possible to switch off the automatic cleanup code, by compiling PHP with MYSQLI_NO_CHANGE_USER_ON_PCONNECT defined.
203:
85:
3207:
101:
269:
144:
116:
255:
250:
192:
3233:
3004:
123:
40:
3248:
2364:
PHP data type value range allows for it. This way, for example, SQL INT columns are returned as integers.
3079:
3131:
2952:
The MySQLi extension does this cleanup by automatically calling the C-API function mysql_change_user().
130:
3105:
2810:
Input parameters are provided with the CALL statement. Please, make sure values are escaped correctly.
97:
93:
331:
112:
3156:
338:
3181:
2795:
405:
389:
MySQLi is an improved version of the older PHP MySQL driver, offering various benefits.
3243:
354:
3227:
3057:
1866:
Reverse order... id = 3 id = 2 id = 1 Result set order... id = 1 id = 2 id = 3
3217:
2979:
137:
3035:
2956:
cleanup needs to run each time a connection is returned from the connection pool.
239:
46:
3212:
2772:
The MySQL server supports using anonymous, positional placeholder with ?.
421:
642:
functions in the old MySQL interface took it as an optional last argument.
342:
346:
350:
327:
84:
Please help to demonstrate the notability of the topic by citing
368:
options when considering connecting to a MySQL database server:
358:
2579:"INSERT INTO test(id, label) VALUES (1, 'a')"
2187:"INSERT INTO test(id, label) VALUES (1, 'a')"
2367:
Example: Native data types with mysqlnd and connection option
365:
335:
233:
175:
61:
20:
2890:
Meta data is access through the mysqli_result interface.
1128:
mysqli_real_query() followed by mysqli_store_result().
341:
to provide an interface with MySQL protocol compatible
265:
199:
1558:"INSERT INTO test(id) VALUES (1), (2), (3)"
191:
may contain excessive or inappropriate references to
2555:"CREATE TABLE test(id INT, label CHAR(1))"
2163:"CREATE TABLE test(id INT, label CHAR(1))"
2939:
Close prepared statements (always happens with PHP)
2648:"SELECT id, label FROM test WHERE id = 1"
2256:"SELECT id, label FROM test WHERE id = 1"
2008:Example: Text protocol returns strings by default
3130:eric dot noel at gmail dot com (March 31, 2014).
2897:The MySQLi extension and persistent connections
254:, potentially preventing the article from being
1898:"SELECT id FROM test ORDER BY id ASC"
1878:Example: Navigation through unbuffered results
1627:"SELECT id FROM test ORDER BY id ASC"
1119:Localhost via UNIX socket 127.0.0.1 via TCP/IP
79:notability guidelines for products and services
3005:"Connection to MySQL/MariaDB/Percona for PHP"
1379:Example: Navigation through buffered results
8:
3157:"PHP: API support for transactions - Manual"
560:API supports client-side Prepared Statements
546:API supports server-side Prepared Statements
1310:"INSERT INTO test(id) VALUES (1)"
55:Learn how and when to remove these messages
3030:
3028:
3026:
3024:
3022:
274:reliable, independent, third-party sources
2471:"Failed to connect to MySQL: ("
2079:"Failed to connect to MySQL: ("
1450:"Failed to connect to MySQL: ("
1202:"Failed to connect to MySQL: ("
1045:"Failed to connect to MySQL: ("
910:"Failed to connect to MySQL: ("
310:Learn how and when to remove this message
292:Learn how and when to remove this message
222:Learn how and when to remove this message
164:Learn how and when to remove this message
443:
268:by replacing them with more appropriate
2971:
251:too closely associated with the subject
3176:
3174:
2945:Release locks acquired with GET_LOCK()
839:Example. Special meaning of localhost
3151:
3149:
2531:"DROP TABLE IF EXISTS test"
2139:"DROP TABLE IF EXISTS test"
1534:"CREATE TABLE test(id INT)"
1510:"DROP TABLE IF EXISTS test"
1286:"CREATE TABLE test(id INT)"
1262:"DROP TABLE IF EXISTS test"
602:Supports all MySQL 4.1+ functionality
518:Recommended by MySQL for new projects
202:by removing references to unreliable
7:
3125:
3123:
3099:
3097:
2752:id = 1 (integer) label = a (string)
2591:"Table creation failed: ("
2199:"Table creation failed: ("
1570:"Table creation failed: ("
1322:"Table creation failed: ("
784:"SELECT * FROM myDatabase"
709:"SELECT * FROM myDatabase"
206:where they are used inappropriately.
3218:Emulate MySQL extension with MySQLi
3208:MySQLi Prepared Statements Tutorial
3132:"PHP: Multiple Statements - Manual"
3080:"PHP: Prepared Statements - Manual"
2360:id = 1 (string) label = a (string)
14:
3106:"PHP: Stored Procedures - Manual"
3058:"PHP: Quick start guide - Manual"
646:New and old native function calls
36:This article has multiple issues.
588:API supports Multiple Statements
508:Active development as of PHP 5.3
249:may rely excessively on sources
238:
180:
66:
25:
3213:MySQLi documentation on PHP.net
2930:Close and drop temporary tables
2749:The above example will output:
2399:MYSQLI_OPT_INT_AND_FLOAT_NATIVE
2357:The above example will output:
1863:The above example will output:
414:Support for multiple statements
411:Support for prepared statements
77:may not meet Knowledge (XXG)'s
44:or discuss these issues on the
574:API supports Stored Procedures
16:PHP driver for MySQL databases
1:
2846:API support for transactions
1131:Example: Connecting to MySQL
2980:"PHP: Introduction - Manual"
2927:Rollback active transactions
2794:The MySQL database supports
2000:Result set values data types
3265:
86:reliable secondary sources
75:The topic of this article
3104:Jonathon (May 24, 2013).
1925:"Result set order...
1771:"Result set order...
3239:Data access technologies
3182:"PHP: Metadata - Manual"
2369:
2010:
1880:
1381:
1133:
841:
649:
511:Deprecated as of PHP 5.5
417:Support for transactions
2936:Reset session variables
2423:"example.com"
2031:"example.com"
1402:"example.com"
1154:"example.com"
742:"example.com"
667:"example.com"
429:Comparison of features
1870:Unbuffered result sets
1636:"Reverse order...
521:Yes - preferred option
460:PHP version introduced
455:PHP's MySQL Extension
449:PHP's MySQLi Extension
378:PHP Data Objects (PDO)
375:PHP's MySQLi Extension
193:self-published sources
2714:"label = %s (%s)
2322:"label = %s (%s)
991:"127.0.0.1"
862:"localhost"
532:API supports Charsets
488:Included with PHP 7.x
474:Included with PHP 5.x
372:PHP's MySQL Extension
364:There are three main
2817:Multiple statements
2441:"database"
2435:"password"
2049:"database"
2043:"password"
1420:"database"
1414:"password"
1367:Buffered result sets
1172:"database"
1166:"password"
1123:Executing statements
1009:"database"
1003:"password"
880:"database"
874:"password"
766:"database"
754:"password"
685:"database"
679:"password"
3036:"Overview - Manual"
2756:Prepared statements
513:Removed in PHP 7.0
334:driver used in the
332:relational database
2779:Stored procedures
2678:"id = %s (%s)
2286:"id = %s (%s)
1967:" id = "
1831:" id = "
1741:" id = "
505:Active development
502:Development status
339:scripting language
81:
2842:See examples in
2813:See examples in.
2796:stored procedures
615:
614:
396:Technical details
320:
319:
312:
302:
301:
294:
232:
231:
224:
174:
173:
166:
148:
76:
59:
3256:
3194:
3193:
3191:
3189:
3178:
3169:
3168:
3166:
3164:
3153:
3144:
3143:
3141:
3139:
3127:
3118:
3117:
3115:
3113:
3101:
3092:
3091:
3089:
3087:
3076:
3070:
3069:
3067:
3065:
3054:
3048:
3047:
3045:
3043:
3032:
3017:
3016:
3014:
3012:
3001:
2995:
2994:
2992:
2990:
2976:
2909:
2908:
2904:
2893:View more here.
2883:
2882:
2878:
2858:
2857:
2853:
2829:
2828:
2824:
2791:
2790:
2786:
2775:See example in.
2745:
2742:
2739:
2736:
2733:
2730:
2727:
2724:
2721:
2718:
2715:
2712:
2709:
2706:
2703:
2700:
2697:
2694:
2691:
2688:
2685:
2682:
2679:
2676:
2673:
2670:
2667:
2664:
2661:
2658:
2655:
2652:
2649:
2646:
2643:
2640:
2637:
2634:
2631:
2628:
2625:
2622:
2619:
2616:
2613:
2610:
2607:
2604:
2601:
2598:
2595:
2592:
2589:
2586:
2583:
2580:
2577:
2574:
2571:
2568:
2565:
2562:
2559:
2556:
2553:
2550:
2547:
2544:
2541:
2538:
2535:
2532:
2529:
2526:
2523:
2520:
2517:
2514:
2511:
2508:
2505:
2502:
2499:
2496:
2493:
2490:
2487:
2484:
2481:
2478:
2475:
2472:
2469:
2466:
2463:
2460:
2457:
2454:
2451:
2448:
2445:
2442:
2439:
2436:
2433:
2430:
2429:"user"
2427:
2424:
2421:
2418:
2415:
2412:
2409:
2406:
2403:
2400:
2397:
2394:
2391:
2388:
2385:
2382:
2379:
2376:
2373:
2353:
2350:
2347:
2344:
2341:
2338:
2335:
2332:
2329:
2326:
2323:
2320:
2317:
2314:
2311:
2308:
2305:
2302:
2299:
2296:
2293:
2290:
2287:
2284:
2281:
2278:
2275:
2272:
2269:
2266:
2263:
2260:
2257:
2254:
2251:
2248:
2245:
2242:
2239:
2236:
2233:
2230:
2227:
2224:
2221:
2218:
2215:
2212:
2209:
2206:
2203:
2200:
2197:
2194:
2191:
2188:
2185:
2182:
2179:
2176:
2173:
2170:
2167:
2164:
2161:
2158:
2155:
2152:
2149:
2146:
2143:
2140:
2137:
2134:
2131:
2128:
2125:
2122:
2119:
2116:
2113:
2110:
2107:
2104:
2101:
2098:
2095:
2092:
2089:
2086:
2083:
2080:
2077:
2074:
2071:
2068:
2065:
2062:
2059:
2056:
2053:
2050:
2047:
2044:
2041:
2038:
2037:"user"
2035:
2032:
2029:
2026:
2023:
2020:
2017:
2014:
1995:
1992:
1989:
1986:
1983:
1980:
1977:
1974:
1971:
1968:
1965:
1962:
1959:
1956:
1953:
1950:
1947:
1944:
1941:
1938:
1935:
1932:
1929:
1926:
1923:
1920:
1917:
1914:
1911:
1908:
1905:
1902:
1899:
1896:
1893:
1890:
1887:
1884:
1859:
1856:
1853:
1850:
1847:
1844:
1841:
1838:
1835:
1832:
1829:
1826:
1823:
1820:
1817:
1814:
1811:
1808:
1805:
1802:
1799:
1796:
1793:
1790:
1787:
1784:
1781:
1778:
1775:
1772:
1769:
1766:
1763:
1760:
1757:
1754:
1751:
1748:
1745:
1742:
1739:
1736:
1733:
1730:
1727:
1724:
1721:
1718:
1715:
1712:
1709:
1706:
1703:
1700:
1697:
1694:
1691:
1688:
1685:
1682:
1679:
1676:
1673:
1670:
1667:
1664:
1661:
1658:
1655:
1652:
1649:
1646:
1643:
1640:
1637:
1634:
1631:
1628:
1625:
1622:
1619:
1616:
1613:
1610:
1607:
1604:
1601:
1598:
1595:
1592:
1589:
1586:
1583:
1580:
1577:
1574:
1571:
1568:
1565:
1562:
1559:
1556:
1553:
1550:
1547:
1544:
1541:
1538:
1535:
1532:
1529:
1526:
1523:
1520:
1517:
1514:
1511:
1508:
1505:
1502:
1499:
1496:
1493:
1490:
1487:
1484:
1481:
1478:
1475:
1472:
1469:
1466:
1463:
1460:
1457:
1454:
1451:
1448:
1445:
1442:
1439:
1436:
1433:
1430:
1427:
1424:
1421:
1418:
1415:
1412:
1409:
1408:"user"
1406:
1403:
1400:
1397:
1394:
1391:
1388:
1385:
1362:
1359:
1356:
1353:
1350:
1347:
1344:
1341:
1338:
1335:
1332:
1329:
1326:
1323:
1320:
1317:
1314:
1311:
1308:
1305:
1302:
1299:
1296:
1293:
1290:
1287:
1284:
1281:
1278:
1275:
1272:
1269:
1266:
1263:
1260:
1257:
1254:
1251:
1248:
1245:
1242:
1239:
1236:
1233:
1230:
1227:
1224:
1221:
1218:
1215:
1212:
1209:
1206:
1203:
1200:
1197:
1194:
1191:
1188:
1185:
1182:
1179:
1176:
1173:
1170:
1167:
1164:
1161:
1160:"user"
1158:
1155:
1152:
1149:
1146:
1143:
1140:
1137:
1112:
1109:
1106:
1103:
1100:
1097:
1094:
1091:
1088:
1085:
1082:
1079:
1076:
1073:
1070:
1067:
1064:
1061:
1058:
1055:
1052:
1049:
1046:
1043:
1040:
1037:
1034:
1031:
1028:
1025:
1022:
1019:
1016:
1013:
1010:
1007:
1004:
1001:
998:
997:"user"
995:
992:
989:
986:
983:
980:
977:
974:
971:
968:
965:
962:
959:
956:
953:
950:
947:
944:
941:
938:
935:
932:
929:
926:
923:
920:
917:
914:
911:
908:
905:
902:
899:
896:
893:
890:
887:
884:
881:
878:
875:
872:
869:
868:"user"
866:
863:
860:
857:
854:
851:
848:
845:
835:
831:
827:
812:
809:
806:
803:
800:
797:
794:
791:
788:
785:
782:
779:
776:
773:
770:
767:
764:
761:
758:
755:
752:
749:
748:"user"
746:
743:
740:
737:
734:
731:
728:
725:
722:
719:
716:
713:
710:
707:
704:
701:
698:
695:
692:
689:
686:
683:
680:
677:
674:
673:"user"
671:
668:
665:
662:
659:
656:
653:
630:
629:
625:
444:
441:
440:
436:
324:MySQLi Extension
315:
308:
297:
290:
286:
283:
277:
242:
234:
227:
220:
216:
213:
207:
184:
183:
176:
169:
162:
158:
155:
149:
147:
106:
70:
69:
62:
51:
29:
28:
21:
3264:
3263:
3259:
3258:
3257:
3255:
3254:
3253:
3234:SQL data access
3224:
3223:
3222:
3203:
3201:Further reading
3198:
3197:
3187:
3185:
3180:
3179:
3172:
3162:
3160:
3155:
3154:
3147:
3137:
3135:
3129:
3128:
3121:
3111:
3109:
3103:
3102:
3095:
3085:
3083:
3078:
3077:
3073:
3063:
3061:
3056:
3055:
3051:
3041:
3039:
3034:
3033:
3020:
3010:
3008:
3003:
3002:
2998:
2988:
2986:
2978:
2977:
2973:
2968:
2963:
2910:
2906:
2902:
2900:
2899:
2884:
2880:
2876:
2874:
2873:
2867:Examples here.
2859:
2855:
2851:
2849:
2848:
2830:
2826:
2822:
2820:
2819:
2792:
2788:
2784:
2782:
2781:
2765:
2758:
2753:
2747:
2746:
2743:
2740:
2737:
2734:
2731:
2728:
2725:
2722:
2719:
2716:
2713:
2710:
2707:
2704:
2701:
2698:
2695:
2692:
2689:
2686:
2683:
2680:
2677:
2674:
2671:
2668:
2665:
2662:
2659:
2656:
2653:
2650:
2647:
2644:
2641:
2638:
2635:
2632:
2629:
2626:
2623:
2620:
2617:
2614:
2611:
2608:
2605:
2602:
2599:
2596:
2593:
2590:
2587:
2584:
2581:
2578:
2575:
2572:
2569:
2566:
2563:
2560:
2557:
2554:
2551:
2548:
2545:
2542:
2539:
2536:
2533:
2530:
2527:
2524:
2521:
2518:
2515:
2512:
2509:
2506:
2503:
2500:
2497:
2494:
2491:
2488:
2485:
2482:
2479:
2476:
2473:
2470:
2467:
2464:
2461:
2458:
2455:
2452:
2449:
2446:
2443:
2440:
2437:
2434:
2431:
2428:
2425:
2422:
2419:
2416:
2413:
2410:
2407:
2404:
2401:
2398:
2395:
2392:
2389:
2386:
2383:
2380:
2377:
2374:
2371:
2361:
2355:
2354:
2351:
2348:
2345:
2342:
2339:
2336:
2333:
2330:
2327:
2324:
2321:
2318:
2315:
2312:
2309:
2306:
2303:
2300:
2297:
2294:
2291:
2288:
2285:
2282:
2279:
2276:
2273:
2270:
2267:
2264:
2261:
2258:
2255:
2252:
2249:
2246:
2243:
2240:
2237:
2234:
2231:
2228:
2225:
2222:
2219:
2216:
2213:
2210:
2207:
2204:
2201:
2198:
2195:
2192:
2189:
2186:
2183:
2180:
2177:
2174:
2171:
2168:
2165:
2162:
2159:
2156:
2153:
2150:
2147:
2144:
2141:
2138:
2135:
2132:
2129:
2126:
2123:
2120:
2117:
2114:
2111:
2108:
2105:
2102:
2099:
2096:
2093:
2090:
2087:
2084:
2081:
2078:
2075:
2072:
2069:
2066:
2063:
2060:
2057:
2054:
2051:
2048:
2045:
2042:
2039:
2036:
2033:
2030:
2027:
2024:
2021:
2018:
2015:
2012:
2001:
1997:
1996:
1993:
1990:
1987:
1984:
1981:
1978:
1975:
1972:
1969:
1966:
1963:
1960:
1957:
1954:
1951:
1948:
1945:
1942:
1939:
1936:
1933:
1930:
1927:
1924:
1921:
1918:
1915:
1912:
1909:
1906:
1903:
1900:
1897:
1894:
1891:
1888:
1885:
1882:
1871:
1867:
1861:
1860:
1857:
1854:
1851:
1848:
1845:
1842:
1839:
1836:
1833:
1830:
1827:
1824:
1821:
1818:
1815:
1812:
1809:
1806:
1803:
1800:
1797:
1794:
1791:
1788:
1785:
1782:
1779:
1776:
1773:
1770:
1767:
1764:
1761:
1758:
1755:
1752:
1749:
1746:
1743:
1740:
1737:
1734:
1731:
1728:
1725:
1722:
1719:
1716:
1713:
1710:
1707:
1704:
1701:
1698:
1695:
1692:
1689:
1686:
1683:
1680:
1677:
1674:
1671:
1668:
1665:
1662:
1659:
1656:
1653:
1650:
1647:
1644:
1641:
1638:
1635:
1632:
1629:
1626:
1623:
1620:
1617:
1614:
1611:
1608:
1605:
1602:
1599:
1596:
1593:
1590:
1587:
1584:
1581:
1578:
1575:
1572:
1569:
1566:
1563:
1560:
1557:
1554:
1551:
1548:
1545:
1542:
1539:
1536:
1533:
1530:
1527:
1524:
1521:
1518:
1515:
1512:
1509:
1506:
1503:
1500:
1497:
1494:
1491:
1488:
1485:
1482:
1479:
1476:
1473:
1470:
1467:
1464:
1461:
1458:
1455:
1452:
1449:
1446:
1443:
1440:
1437:
1434:
1431:
1428:
1425:
1422:
1419:
1416:
1413:
1410:
1407:
1404:
1401:
1398:
1395:
1392:
1389:
1386:
1383:
1368:
1364:
1363:
1360:
1357:
1354:
1351:
1348:
1345:
1342:
1339:
1336:
1333:
1330:
1327:
1324:
1321:
1318:
1315:
1312:
1309:
1306:
1303:
1300:
1297:
1294:
1291:
1288:
1285:
1282:
1279:
1276:
1273:
1270:
1267:
1264:
1261:
1258:
1255:
1252:
1249:
1246:
1243:
1240:
1237:
1234:
1231:
1228:
1225:
1222:
1219:
1216:
1213:
1210:
1207:
1204:
1201:
1198:
1195:
1192:
1189:
1186:
1183:
1180:
1177:
1174:
1171:
1168:
1165:
1162:
1159:
1156:
1153:
1150:
1147:
1144:
1141:
1138:
1135:
1125:
1120:
1114:
1113:
1110:
1107:
1104:
1101:
1098:
1095:
1092:
1089:
1086:
1083:
1080:
1077:
1074:
1071:
1068:
1065:
1062:
1059:
1056:
1053:
1050:
1047:
1044:
1041:
1038:
1035:
1032:
1029:
1026:
1023:
1020:
1017:
1014:
1011:
1008:
1005:
1002:
999:
996:
993:
990:
987:
984:
981:
978:
975:
972:
969:
966:
963:
960:
957:
954:
951:
948:
945:
942:
939:
936:
933:
930:
927:
924:
921:
918:
915:
912:
909:
906:
903:
900:
897:
894:
891:
888:
885:
882:
879:
876:
873:
870:
867:
864:
861:
858:
855:
852:
849:
846:
843:
833:
829:
825:
819:
814:
813:
810:
807:
804:
801:
798:
795:
792:
789:
786:
783:
780:
777:
774:
771:
768:
765:
762:
760:mysql_select_db
759:
756:
753:
750:
747:
744:
741:
738:
735:
732:
729:
726:
723:
720:
718:mysqli_num_rows
717:
714:
711:
708:
705:
702:
699:
696:
693:
690:
687:
684:
681:
678:
675:
672:
669:
666:
663:
660:
657:
654:
651:
636:
631:
627:
623:
621:
620:
512:
442:
438:
434:
432:
431:
406:object-oriented
398:
330:Improved) is a
316:
305:
304:
303:
298:
287:
281:
278:
263:
243:
228:
217:
211:
208:
197:
185:
181:
170:
159:
153:
150:
107:
105:
83:
71:
67:
30:
26:
17:
12:
11:
5:
3262:
3260:
3252:
3251:
3246:
3241:
3236:
3226:
3225:
3221:
3220:
3215:
3210:
3204:
3202:
3199:
3196:
3195:
3170:
3145:
3119:
3093:
3071:
3049:
3018:
2996:
2970:
2969:
2967:
2964:
2961:
2947:
2946:
2943:
2940:
2937:
2934:
2931:
2928:
2898:
2895:
2872:
2869:
2847:
2844:
2818:
2815:
2780:
2777:
2764:Basic workflow
2763:
2757:
2754:
2751:
2609:") "
2489:") "
2370:
2359:
2217:") "
2097:") "
2011:
1999:
1881:
1869:
1865:
1588:") "
1468:") "
1382:
1366:
1340:") "
1220:") "
1134:
1124:
1121:
1118:
1063:") "
928:") "
842:
818:
815:
799:mysql_num_rows
661:mysqli_connect
650:
635:
634:Dual interface
632:
619:
616:
613:
612:
609:
606:
603:
599:
598:
595:
592:
589:
585:
584:
581:
578:
575:
571:
570:
567:
564:
561:
557:
556:
553:
550:
547:
543:
542:
539:
536:
533:
529:
528:
525:
522:
519:
515:
514:
509:
506:
503:
499:
498:
495:
492:
489:
485:
484:
481:
478:
475:
471:
470:
467:
464:
461:
457:
456:
453:
450:
447:
430:
427:
426:
425:
418:
415:
412:
409:
397:
394:
380:
379:
376:
373:
355:Percona Server
318:
317:
300:
299:
246:
244:
237:
230:
229:
188:
186:
179:
172:
171:
74:
72:
65:
60:
34:
33:
31:
24:
15:
13:
10:
9:
6:
4:
3:
2:
3261:
3250:
3249:PHP libraries
3247:
3245:
3242:
3240:
3237:
3235:
3232:
3231:
3229:
3219:
3216:
3214:
3211:
3209:
3206:
3205:
3200:
3184:. In2.php.net
3183:
3177:
3175:
3171:
3159:. In2.php.net
3158:
3152:
3150:
3146:
3134:. In2.php.net
3133:
3126:
3124:
3120:
3108:. In2.php.net
3107:
3100:
3098:
3094:
3082:. In2.php.net
3081:
3075:
3072:
3060:. In2.php.net
3059:
3053:
3050:
3037:
3031:
3029:
3027:
3025:
3023:
3019:
3006:
3000:
2997:
2985:
2981:
2975:
2972:
2965:
2960:
2957:
2953:
2950:
2944:
2942:Close handler
2941:
2938:
2935:
2933:Unlock tables
2932:
2929:
2926:
2925:
2924:
2921:
2917:
2914:
2905:
2896:
2894:
2891:
2888:
2879:
2870:
2868:
2865:
2862:
2854:
2845:
2843:
2840:
2837:
2833:
2825:
2816:
2814:
2811:
2808:
2807:IN parameter
2805:
2802:
2799:
2797:
2787:
2778:
2776:
2773:
2770:
2766:
2761:
2755:
2750:
2501:connect_error
2483:connect_errno
2459:connect_errno
2368:
2365:
2358:
2109:connect_error
2091:connect_errno
2067:connect_errno
2009:
2006:
2002:
1879:
1876:
1872:
1864:
1480:connect_error
1462:connect_errno
1438:connect_errno
1380:
1377:
1373:
1369:
1232:connect_error
1214:connect_errno
1190:connect_errno
1132:
1129:
1122:
1117:
1075:connect_error
1057:connect_errno
1033:connect_errno
940:connect_error
922:connect_errno
898:connect_errno
840:
837:
832:you must use
824:The hostname
822:
816:
736:mysql_connect
648:
647:
643:
639:
633:
626:
617:
610:
607:
604:
601:
600:
596:
593:
590:
587:
586:
582:
579:
576:
573:
572:
568:
565:
562:
559:
558:
554:
551:
548:
545:
544:
540:
537:
534:
531:
530:
526:
523:
520:
517:
516:
510:
507:
504:
501:
500:
496:
493:
490:
487:
486:
482:
479:
476:
473:
472:
468:
465:
462:
459:
458:
454:
451:
448:
446:
445:
437:
428:
423:
419:
416:
413:
410:
407:
403:
402:
401:
395:
393:
390:
387:
384:
377:
374:
371:
370:
369:
367:
362:
360:
356:
352:
348:
344:
340:
337:
333:
329:
325:
314:
311:
296:
293:
285:
275:
271:
267:
261:
257:
253:
252:
247:This article
245:
241:
236:
235:
226:
223:
215:
205:
201:
195:
194:
189:This article
187:
178:
177:
168:
165:
157:
146:
143:
139:
136:
132:
129:
125:
122:
118:
115: –
114:
110:
109:Find sources:
103:
99:
95:
91:
87:
80:
73:
64:
63:
58:
56:
49:
48:
43:
42:
37:
32:
23:
22:
19:
3186:. Retrieved
3161:. Retrieved
3136:. Retrieved
3110:. Retrieved
3084:. Retrieved
3074:
3062:. Retrieved
3052:
3040:. Retrieved
3011:November 22,
3009:. Retrieved
2999:
2987:. Retrieved
2983:
2974:
2958:
2954:
2951:
2948:
2922:
2918:
2915:
2911:
2892:
2889:
2885:
2866:
2863:
2860:
2841:
2838:
2834:
2831:
2812:
2809:
2806:
2803:
2800:
2793:
2774:
2771:
2767:
2762:
2759:
2748:
2417:real_connect
2366:
2362:
2356:
2007:
2003:
1998:
1877:
1873:
1868:
1862:
1378:
1374:
1370:
1365:
1130:
1126:
1115:
838:
823:
820:
697:mysqli_query
645:
644:
640:
637:
618:Start guide
399:
391:
388:
385:
381:
363:
323:
321:
306:
288:
282:October 2015
279:
264:Please help
248:
218:
212:October 2015
209:
198:Please help
190:
160:
154:October 2015
151:
141:
134:
127:
120:
108:
52:
45:
39:
38:Please help
35:
18:
3007:. Virtuozzo
2984:www.php.net
2666:fetch_assoc
2381:mysqli_init
2274:fetch_assoc
1955:fetch_assoc
1819:fetch_assoc
1732:fetch_assoc
817:Connections
778:mysql_query
90:independent
3228:Categories
3188:August 11,
3163:August 11,
3138:August 11,
3112:August 11,
3086:August 11,
3064:August 11,
3042:August 11,
2966:References
2801:Parameter
1916:use_result
1892:real_query
266:improve it
256:verifiable
200:improve it
124:newspapers
98:redirected
41:improve it
2989:August 6,
2887:aligned.
2871:Metadata
1789:data_seek
1708:data_seek
1093:host_info
958:host_info
836:instead.
834:127.0.0.1
830:localhost
826:localhost
422:debugging
420:Enhanced
408:interface
343:databases
270:citations
88:that are
47:talk page
2636:$ mysqli
2615:$ mysqli
2597:$ mysqli
2567:$ mysqli
2543:$ mysqli
2519:$ mysqli
2495:$ mysqli
2477:$ mysqli
2453:$ mysqli
2411:$ mysqli
2387:$ mysqli
2375:$ mysqli
2372:<?php
2244:$ mysqli
2223:$ mysqli
2205:$ mysqli
2175:$ mysqli
2151:$ mysqli
2127:$ mysqli
2103:$ mysqli
2085:$ mysqli
2061:$ mysqli
2016:$ mysqli
2013:<?php
1910:$ mysqli
1886:$ mysqli
1883:<?php
1714:$ row_no
1690:$ row_no
1678:$ row_no
1666:num_rows
1654:$ row_no
1615:$ mysqli
1594:$ mysqli
1576:$ mysqli
1546:$ mysqli
1522:$ mysqli
1498:$ mysqli
1474:$ mysqli
1456:$ mysqli
1432:$ mysqli
1387:$ mysqli
1384:<?php
1346:$ mysqli
1328:$ mysqli
1298:$ mysqli
1274:$ mysqli
1250:$ mysqli
1226:$ mysqli
1208:$ mysqli
1184:$ mysqli
1139:$ mysqli
1136:<?php
1087:$ mysqli
1069:$ mysqli
1051:$ mysqli
1027:$ mysqli
976:$ mysqli
952:$ mysqli
934:$ mysqli
916:$ mysqli
892:$ mysqli
847:$ mysqli
844:<?php
805:$ result
772:$ result
724:$ result
703:$ mysqli
691:$ result
655:$ mysqli
652:<?php
469:pre-3.0
113:"MySQLi"
2732:gettype
2696:gettype
2393:options
2340:gettype
2304:gettype
1116:Output
790:$ mysql
730:$ mysql
424:support
347:MariaDB
260:neutral
204:sources
138:scholar
102:deleted
2901:": -->
2875:": -->
2850:": -->
2821:": -->
2783:": -->
2720:"
2708:printf
2684:"
2672:printf
2328:"
2316:printf
2292:"
2280:printf
2025:mysqli
1985:"
1979:"
1931:"
1849:"
1843:"
1777:"
1759:"
1753:"
1642:"
1396:mysqli
1148:mysqli
1105:"
1099:"
985:mysqli
970:"
964:"
856:mysqli
622:": -->
433:": -->
140:
133:
126:
119:
111:
94:merged
3244:MySQL
3038:. PHP
2744:?>
2738:$ row
2726:$ row
2702:$ row
2690:$ row
2663:->
2660:$ res
2654:$ row
2642:query
2639:->
2630:$ res
2621:error
2618:->
2603:errno
2600:->
2573:query
2570:->
2549:query
2546:->
2525:query
2522:->
2498:->
2480:->
2456:->
2414:->
2390:->
2352:?>
2346:$ row
2334:$ row
2310:$ row
2298:$ row
2271:->
2268:$ res
2262:$ row
2250:query
2247:->
2238:$ res
2229:error
2226:->
2211:errno
2208:->
2181:query
2178:->
2157:query
2154:->
2133:query
2130:->
2106:->
2088:->
2064:->
1994:?>
1973:$ row
1952:->
1949:$ res
1943:$ row
1937:while
1913:->
1904:$ res
1889:->
1858:?>
1837:$ row
1816:->
1813:$ res
1807:$ row
1801:while
1786:->
1783:$ res
1747:$ row
1729:->
1726:$ res
1720:$ row
1705:->
1702:$ res
1681:>=
1663:->
1660:$ res
1621:query
1618:->
1609:$ res
1600:error
1597:->
1582:errno
1579:->
1552:query
1549:->
1528:query
1525:->
1504:query
1501:->
1477:->
1459:->
1435:->
1361:?>
1352:error
1349:->
1334:errno
1331:->
1304:query
1301:->
1280:query
1277:->
1256:query
1253:->
1229:->
1211:->
1187:->
1111:?>
1090:->
1072:->
1054:->
1030:->
955:->
937:->
919:->
895:->
811:?>
351:MySQL
328:MySQL
145:JSTOR
131:books
100:, or
3190:2014
3165:2014
3140:2014
3114:2014
3088:2014
3066:2014
3044:2014
3013:2023
2991:2024
2903:edit
2877:edit
2852:edit
2823:edit
2785:edit
2588:echo
2468:echo
2196:echo
2076:echo
1964:echo
1922:echo
1828:echo
1768:echo
1738:echo
1633:echo
1567:echo
1447:echo
1319:echo
1199:echo
1084:echo
1042:echo
1015:3306
949:echo
907:echo
796:echo
715:echo
624:edit
608:Most
594:Most
483:Yes
435:edit
359:TiDB
322:The
258:and
117:news
2741:));
2705:));
2669:();
2384:();
2349:));
2313:));
2277:();
2022:new
1958:())
1919:();
1822:())
1735:();
1648:for
1393:new
1145:new
982:new
853:new
611:No
605:Yes
597:No
591:Yes
583:No
580:Yes
577:Yes
569:No
566:Yes
555:No
552:Yes
549:Yes
541:No
538:Yes
535:Yes
527:No
524:Yes
497:No
494:Yes
491:Yes
480:Yes
477:Yes
466:5.0
463:5.0
452:PDO
404:An
366:API
361:).
336:PHP
272:to
3230::
3173:^
3148:^
3122:^
3096:^
3021:^
2982:.
2717:\n
2681:\n
2651:);
2582:))
2561:||
2537:||
2510:if
2447:if
2444:);
2408:);
2325:\n
2289:\n
2259:);
2190:))
2169:||
2145:||
2118:if
2055:if
2052:);
1982:\n
1928:\n
1901:);
1846:\n
1798:);
1774:\n
1756:\n
1717:);
1693:--
1639:\n
1630:);
1561:))
1540:||
1516:||
1489:if
1426:if
1423:);
1313:))
1292:||
1268:||
1241:if
1178:if
1175:);
1102:\n
1021:if
1018:);
967:\n
886:if
883:);
808:);
793:);
769:);
757:);
727:);
712:);
688:);
563:No
357:,
353:,
349:,
96:,
50:.
3192:.
3167:.
3142:.
3116:.
3090:.
3068:.
3046:.
3015:.
2993:.
2907:]
2881:]
2856:]
2827:]
2789:]
2735:(
2729:,
2723:,
2711:(
2699:(
2693:,
2687:,
2675:(
2657:=
2645:(
2633:=
2627:}
2624:;
2612:.
2606:.
2594:.
2585:{
2576:(
2564:!
2558:)
2552:(
2540:!
2534:)
2528:(
2516:!
2513:(
2507:}
2504:;
2492:.
2486:.
2474:.
2465:{
2462:)
2450:(
2438:,
2432:,
2426:,
2420:(
2405:1
2402:,
2396:(
2378:=
2343:(
2337:,
2331:,
2319:(
2307:(
2301:,
2295:,
2283:(
2265:=
2253:(
2241:=
2235:}
2232:;
2220:.
2214:.
2202:.
2193:{
2184:(
2172:!
2166:)
2160:(
2148:!
2142:)
2136:(
2124:!
2121:(
2115:}
2112:;
2100:.
2094:.
2082:.
2073:{
2070:)
2058:(
2046:,
2040:,
2034:,
2028:(
2019:=
1991:}
1988:;
1976:.
1970:.
1961:{
1946:=
1940:(
1934:;
1907:=
1895:(
1855:}
1852:;
1840:.
1834:.
1825:{
1810:=
1804:(
1795:0
1792:(
1780:;
1765:}
1762:;
1750:.
1744:.
1723:=
1711:(
1699:{
1696:)
1687:;
1684:0
1675:;
1672:1
1669:-
1657:=
1651:(
1645:;
1624:(
1612:=
1606:}
1603:;
1591:.
1585:.
1573:.
1564:{
1555:(
1543:!
1537:)
1531:(
1519:!
1513:)
1507:(
1495:!
1492:(
1486:}
1483:;
1471:.
1465:.
1453:.
1444:{
1441:)
1429:(
1417:,
1411:,
1405:,
1399:(
1390:=
1358:}
1355:;
1343:.
1337:.
1325:.
1316:{
1307:(
1295:!
1289:)
1283:(
1271:!
1265:)
1259:(
1247:!
1244:(
1238:}
1235:;
1223:.
1217:.
1205:.
1196:{
1193:)
1181:(
1169:,
1163:,
1157:,
1151:(
1142:=
1108:;
1096:.
1081:}
1078:;
1066:.
1060:.
1048:.
1039:{
1036:)
1024:(
1012:,
1006:,
1000:,
994:,
988:(
979:=
973:;
961:.
946:}
943:;
931:.
925:.
913:.
904:{
901:)
889:(
877:,
871:,
865:,
859:(
850:=
802:(
787:,
781:(
775:=
763:(
751:,
745:,
739:(
733:=
721:(
706:,
700:(
694:=
682:,
676:,
670:,
664:(
658:=
628:]
439:]
345:(
326:(
313:)
307:(
295:)
289:(
284:)
280:(
276:.
262:.
225:)
219:(
214:)
210:(
196:.
167:)
161:(
156:)
152:(
142:·
135:·
128:·
121:·
104:.
82:.
57:)
53:(
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.