-
Notifications
You must be signed in to change notification settings - Fork 7
/
mysqli.php
4085 lines (3781 loc) · 120 KB
/
mysqli.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// Start of mysqli v.7.0.4-7ubuntu2
/**
* The mysqli exception handling class.
* @link http://php.net/manual/en/class.mysqli-sql-exception.php
*/
final class mysqli_sql_exception extends RuntimeException implements Throwable {
protected $message;
protected $file;
protected $line;
protected $code;
protected $sqlstate;
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Clone the exception
* @link http://php.net/manual/en/exception.clone.php
* @return void No value is returned.
*/
final private function __clone() {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Construct the exception
* @link http://php.net/manual/en/exception.construct.php
* @param string $message [optional] <p>
* The Exception message to throw.
* </p>
* @param int $code [optional] <p>
* The Exception code.
* </p>
* @param Throwable $previous [optional] <p>
* The previous exception used for the exception chaining.
* </p>
*/
public function __construct(string $message = "", int $code = 0, Throwable $previous = null) {}
public function __wakeup() {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Gets the Exception message
* @link http://php.net/manual/en/exception.getmessage.php
* @return string the Exception message as a string.
*/
final public function getMessage(): string {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Gets the Exception code
* @link http://php.net/manual/en/exception.getcode.php
* @return mixed the exception code as integer in
* <b>Exception</b> but possibly as other type in
* <b>Exception</b> descendants (for example as
* string in <b>PDOException</b>).
*/
final public function getCode() {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Gets the file in which the exception occurred
* @link http://php.net/manual/en/exception.getfile.php
* @return string the filename in which the exception was created.
*/
final public function getFile(): string {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Gets the line in which the exception occurred
* @link http://php.net/manual/en/exception.getline.php
* @return int the line number where the exception was created.
*/
final public function getLine(): int {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Gets the stack trace
* @link http://php.net/manual/en/exception.gettrace.php
* @return array the Exception stack trace as an array.
*/
final public function getTrace(): array {}
/**
* (PHP 5 >= 5.3.0, PHP 7)<br/>
* Returns previous Exception
* @link http://php.net/manual/en/exception.getprevious.php
* @return Exception the previous <b>Exception</b> if available
* or <b>NULL</b> otherwise.
*/
final public function getPrevious(): Exception {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Gets the stack trace as a string
* @link http://php.net/manual/en/exception.gettraceasstring.php
* @return string the Exception stack trace as a string.
*/
final public function getTraceAsString(): string {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* String representation of the exception
* @link http://php.net/manual/en/exception.tostring.php
* @return string the string representation of the exception.
*/
public function __toString(): string {}
}
/**
* MySQLi Driver.
* @link http://php.net/manual/en/class.mysqli-driver.php
*/
final class mysqli_driver {
/**
* @var string
*/
public $client_info;
/**
* @var string
*/
public $client_version;
/**
* @var string
*/
public $driver_version;
/**
* @var string
*/
public $embedded;
/**
* @var bool
*/
public $reconnect;
/**
* @var int
*/
public $report_mode;
}
/**
* Represents a connection between PHP and a MySQL database.
* @link http://php.net/manual/en/class.mysqli.php
*/
class mysqli {
/**
* @var int
*/
public $affected_rows;
/**
* @var string
*/
public $client_info;
/**
* @var int
*/
public $client_version;
/**
* @var int
*/
public $connect_errno;
/**
* @var string
*/
public $connect_error;
/**
* @var int
*/
public $errno;
/**
* @var array
*/
public $error_list;
/**
* @var string
*/
public $error;
/**
* @var int
*/
public $field_count;
/**
* @var int
*/
public $client_version;
/**
* @var string
*/
public $host_info;
/**
* @var string
*/
public $protocol_version;
/**
* @var string
*/
public $server_info;
/**
* @var int
*/
public $server_version;
/**
* @var string
*/
public $info;
/**
* @var mixed
*/
public $insert_id;
/**
* @var string
*/
public $sqlstate;
/**
* @var int
*/
public $thread_id;
/**
* @var int
*/
public $warning_count;
/**
* (PHP 5, PHP 7)<br/>
* Turns on or off auto-committing database modifications
* @link http://php.net/manual/en/mysqli.autocommit.php
* @param bool $mode <p>
* Whether to turn on auto-commit or not.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function autocommit(bool $mode): bool {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Starts a transaction
* @link http://php.net/manual/en/mysqli.begin-transaction.php
* @param int $flags [optional] <p>
* Valid flags are:
* </p>
* <p>
* <b>MYSQLI_TRANS_START_READ_ONLY</b>:
* Start the transaction as "START TRANSACTION READ ONLY".
* </p>
* @param string $name [optional] <p>
* Savepoint name for the transaction.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function begin_transaction(int $flags = null, string $name = null): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Changes the user of the specified database connection
* @link http://php.net/manual/en/mysqli.change-user.php
* @param string $user <p>
* The MySQL user name.
* </p>
* @param string $password <p>
* The MySQL password.
* </p>
* @param string $database <p>
* The database to change to.
* </p>
* <p>
* If desired, the <b>NULL</b> value may be passed resulting in only changing
* the user and not selecting a database. To select a database in this
* case use the <b>mysqli_select_db</b> function.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function change_user(string $user, string $password, string $database): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Returns the default character set for the database connection
* @link http://php.net/manual/en/mysqli.character-set-name.php
* @return string The default character set for the current connection
*/
public function character_set_name(): string {}
/**
* (PHP 5, PHP 7)<br/>
* Closes a previously opened database connection
* @link http://php.net/manual/en/mysqli.close.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function close(): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Commits the current transaction
* @link http://php.net/manual/en/mysqli.commit.php
* @param int $flags [optional] <p>
* A bitmask of <b>MYSQLI_TRANS_COR_*</b> constants.
* </p>
* @param string $name [optional] <p>
* If provided then COMMIT/*name* / is executed.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function commit(int $flags = null, string $name = null): bool {}
/**
* @param $host [optional]
* @param $user [optional]
* @param $password [optional]
* @param $database [optional]
* @param $port [optional]
* @param $socket [optional]
*/
public function connect($host, $user, $password, $database, $port, $socket) {}
/**
* (PHP 5, PHP 7)<br/>
* Dump debugging information into the log
* @link http://php.net/manual/en/mysqli.dump-debug-info.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function dump_debug_info(): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Performs debugging operations
* @link http://php.net/manual/en/mysqli.debug.php
* @param string $message <p>
* A string representing the debugging operation to perform
* </p>
* @return bool <b>TRUE</b>.
*/
public function debug(string $message): bool {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Returns a character set object
* @link http://php.net/manual/en/mysqli.get-charset.php
* @return object The function returns a character set object with the following properties:
* <i>charset</i>
* <p>Character set name</p>
* <i>collation</i>
* <p>Collation name</p>
* <i>dir</i>
* <p>Directory the charset description was fetched from (?) or "" for built-in character sets</p>
* <i>min_length</i>
* <p>Minimum character length in bytes</p>
* <i>max_length</i>
* <p>Maximum character length in bytes</p>
* <i>number</i>
* <p>Internal character set number</p>
* <i>state</i>
* <p>Character set status (?)</p>
*/
public function get_charset() {}
/**
* (PHP 5, PHP 7)<br/>
* Get MySQL client info
* @link http://php.net/manual/en/mysqli.get-client-info.php
* @return string A string that represents the MySQL client library version
*/
public function get_client_info(): string {}
/**
* (PHP 5 >= 5.3.0, PHP 7)<br/>
* Returns statistics about the client connection
* @link http://php.net/manual/en/mysqli.get-connection-stats.php
* @return bool an array with connection stats if success, <b>FALSE</b> otherwise.
*/
public function get_connection_stats(): bool {}
public function get_server_info() {}
/**
* (PHP 5 >= 5.1.0, PHP 7)<br/>
* Get result of SHOW WARNINGS
* @link http://php.net/manual/en/mysqli.get-warnings.php
* @return mysqli_warning
*/
public function get_warnings(): mysqli_warning {}
/**
* (PHP 5, PHP 7)<br/>
* Initializes MySQLi and returns a resource for use with mysqli_real_connect()
* @link http://php.net/manual/en/mysqli.init.php
* @return mysqli an object.
*/
public function init(): mysqli {}
/**
* (PHP 5, PHP 7)<br/>
* Asks the server to kill a MySQL thread
* @link http://php.net/manual/en/mysqli.kill.php
* @param int $processid
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function kill(int $processid): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Performs a query on the database
* @link http://php.net/manual/en/mysqli.multi-query.php
* @param string $query <p>
* The query, as a string.
* </p>
* <p>
* Data inside the query should be properly escaped.
* </p>
* @return bool <b>FALSE</b> if the first statement failed.
* To retrieve subsequent errors from other statements you have to call
* <b>mysqli_next_result</b> first.
*/
public function multi_query(string $query): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Open a new connection to the MySQL server
* @link http://php.net/manual/en/mysqli.construct.php
* @param string $host [optional] <p>
* Can be either a host name or an IP address. Passing the <b>NULL</b> value
* or the string "localhost" to this parameter, the local host is
* assumed. When possible, pipes will be used instead of the TCP/IP
* protocol.
* </p>
* <p>
* Prepending host by p: opens a persistent connection.
* <b>mysqli_change_user</b> is automatically called on
* connections opened from the connection pool.
* </p>
* @param string $username [optional] <p>
* The MySQL user name.
* </p>
* @param string $passwd [optional] <p>
* If not provided or <b>NULL</b>, the MySQL server will attempt to authenticate
* the user against those user records which have no password only. This
* allows one username to be used with different permissions (depending
* on if a password as provided or not).
* </p>
* @param string $dbname [optional] <p>
* If provided will specify the default database to be used when
* performing queries.
* </p>
* @param int $port [optional] <p>
* Specifies the port number to attempt to connect to the MySQL server.
* </p>
* @param string $socket [optional] <p>
* Specifies the socket or named pipe that should be used.
* </p>
* <p>
* Specifying the <i>socket</i> parameter will not
* explicitly determine the type of connection to be used when
* connecting to the MySQL server. How the connection is made to the
* MySQL database is determined by the <i>host</i>
* parameter.
* </p>
*/
public function __construct(string $host = 'ini_get("mysqli.default_host")', string $username = 'ini_get("mysqli.default_user")', string $passwd = 'ini_get("mysqli.default_pw")', string $dbname = "", int $port = 'ini_get("mysqli.default_port")', string $socket = 'ini_get("mysqli.default_socket")') {}
/**
* (PHP 5, PHP 7)<br/>
* Check if there are any more query results from a multi query
* @link http://php.net/manual/en/mysqli.more-results.php
* @return bool <b>TRUE</b> if one or more result sets are available from a previous call to
* <b>mysqli_multi_query</b>, otherwise <b>FALSE</b>.
*/
public function more_results(): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Prepare next result from multi_query
* @link http://php.net/manual/en/mysqli.next-result.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function next_result(): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Set options
* @link http://php.net/manual/en/mysqli.options.php
* @param int $option <p>
* The option that you want to set. It can be one of the following values:
* <table>
* Valid options
* <tr valign="top">
* <td>Name</td>
* <td>Description</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_OPT_CONNECT_TIMEOUT</b></td>
* <td>connection timeout in seconds (supported on Windows with TCP/IP since PHP 5.3.1)</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_OPT_LOCAL_INFILE</b></td>
* <td>enable/disable use of LOAD LOCAL INFILE</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_INIT_COMMAND</b></td>
* <td>command to execute after when connecting to MySQL server</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_READ_DEFAULT_FILE</b></td>
* <td>
* Read options from named option file instead of my.cnf
* </td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_READ_DEFAULT_GROUP</b></td>
* <td>
* Read options from the named group from my.cnf
* or the file specified with <b>MYSQL_READ_DEFAULT_FILE</b>.
* </td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_SERVER_PUBLIC_KEY</b></td>
* <td>
* RSA public key file used with the SHA-256 based authentication.
* </td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_OPT_NET_CMD_BUFFER_SIZE</b></td>
* <td>
* The size of the internal command/network buffer. Only valid for
* mysqlnd.
* </td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_OPT_NET_READ_BUFFER_SIZE</b></td>
* <td>
* Maximum read chunk size in bytes when reading the body of a MySQL
* command packet. Only valid for mysqlnd.
* </td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_OPT_INT_AND_FLOAT_NATIVE</b></td>
* <td>
* Convert integer and float columns back to PHP numbers. Only valid
* for mysqlnd.
* </td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_OPT_SSL_VERIFY_SERVER_CERT</b></td>
* <td>
* </td>
* </tr>
* </table>
* </p>
* @param mixed $value <p>
* The value for the option.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function options(int $option, $value): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Pings a server connection, or tries to reconnect if the connection has gone down
* @link http://php.net/manual/en/mysqli.ping.php
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function ping(): bool {}
/**
* (PHP 5 >= 5.3.0, PHP 7)<br/>
* Poll connections
* @link http://php.net/manual/en/mysqli.poll.php
* @param array $read <p>
* List of connections to check for outstanding results that can be read.
* </p>
* @param array $error <p>
* List of connections on which an error occured, for example, query
* failure or lost connection.
* </p>
* @param array $reject <p>
* List of connections rejected because no asynchronous query
* has been run on for which the function could poll results.
* </p>
* @param int $sec <p>
* Number of seconds to wait, must be non-negative.
* </p>
* @param int $usec [optional] <p>
* Number of microseconds to wait, must be non-negative.
* </p>
* @return int number of ready connections upon success, <b>FALSE</b> otherwise.
*/
public static function poll(array &$read, array &$error, array &$reject, int $sec, int $usec = null): int {}
/**
* (PHP 5, PHP 7)<br/>
* Prepare an SQL statement for execution
* @link http://php.net/manual/en/mysqli.prepare.php
* @param string $query <p>
* The query, as a string.
* </p>
* <p>
* You should not add a terminating semicolon or \g
* to the statement.
* </p>
* <p>
* This parameter can include one or more parameter markers in the SQL
* statement by embedding question mark (?) characters
* at the appropriate positions.
* </p>
* <p>
* The markers are legal only in certain places in SQL statements.
* For example, they are allowed in the VALUES()
* list of an INSERT statement (to specify column
* values for a row), or in a comparison with a column in a
* WHERE clause to specify a comparison value.
* </p>
* <p>
* However, they are not allowed for identifiers (such as table or
* column names), in the select list that names the columns to be
* returned by a SELECT statement, or to specify both
* operands of a binary operator such as the = equal
* sign. The latter restriction is necessary because it would be
* impossible to determine the parameter type. It's not allowed to
* compare marker with NULL by
* ? IS NULL too. In general, parameters are legal
* only in Data Manipulation Language (DML) statements, and not in Data
* Definition Language (DDL) statements.
* </p>
* @return mysqli_stmt <b>mysqli_prepare</b> returns a statement object or <b>FALSE</b> if an error occurred.
*/
public function prepare(string $query): mysqli_stmt {}
/**
* (PHP 5, PHP 7)<br/>
* Performs a query on the database
* @link http://php.net/manual/en/mysqli.query.php
* @param string $query <p>
* The query string.
* </p>
* <p>
* Data inside the query should be properly escaped.
* </p>
* @param int $resultmode [optional] <p>
* Either the constant <b>MYSQLI_USE_RESULT</b> or
* <b>MYSQLI_STORE_RESULT</b> depending on the desired
* behavior. By default, <b>MYSQLI_STORE_RESULT</b> is used.
* </p>
* <p>
* If you use <b>MYSQLI_USE_RESULT</b> all subsequent calls
* will return error Commands out of sync unless you
* call <b>mysqli_free_result</b>
* </p>
* <p>
* With <b>MYSQLI_ASYNC</b> (available with mysqlnd), it is
* possible to perform query asynchronously.
* <b>mysqli_poll</b> is then used to get results from such
* queries.
* </p>
* @return mixed <b>FALSE</b> on failure. For successful SELECT, SHOW, DESCRIBE or
* EXPLAIN queries <b>mysqli_query</b> will return
* a <b>mysqli_result</b> object. For other successful queries <b>mysqli_query</b> will
* return <b>TRUE</b>.
*/
public function query(string $query, int $resultmode = MYSQLI_STORE_RESULT) {}
/**
* (PHP 5, PHP 7)<br/>
* Opens a connection to a mysql server
* @link http://php.net/manual/en/mysqli.real-connect.php
* @param string $host [optional] <p>
* Can be either a host name or an IP address. Passing the <b>NULL</b> value
* or the string "localhost" to this parameter, the local host is
* assumed. When possible, pipes will be used instead of the TCP/IP
* protocol.
* </p>
* @param string $username [optional] <p>
* The MySQL user name.
* </p>
* @param string $passwd [optional] <p>
* If provided or <b>NULL</b>, the MySQL server will attempt to authenticate
* the user against those user records which have no password only. This
* allows one username to be used with different permissions (depending
* on if a password as provided or not).
* </p>
* @param string $dbname [optional] <p>
* If provided will specify the default database to be used when
* performing queries.
* </p>
* @param int $port [optional] <p>
* Specifies the port number to attempt to connect to the MySQL server.
* </p>
* @param string $socket [optional] <p>
* Specifies the socket or named pipe that should be used.
* </p>
* <p>
* Specifying the <i>socket</i> parameter will not
* explicitly determine the type of connection to be used when
* connecting to the MySQL server. How the connection is made to the
* MySQL database is determined by the <i>host</i>
* parameter.
* </p>
* @param int $flags [optional] <p>
* With the parameter <i>flags</i> you can set different
* connection options:
* </p>
* <table>
* Supported flags
* <tr valign="top">
* <td>Name</td>
* <td>Description</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_CLIENT_COMPRESS</b></td>
* <td>Use compression protocol</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_CLIENT_FOUND_ROWS</b></td>
* <td>return number of matched rows, not the number of affected rows</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_CLIENT_IGNORE_SPACE</b></td>
* <td>Allow spaces after function names. Makes all function names reserved words.</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_CLIENT_INTERACTIVE</b></td>
* <td>
* Allow interactive_timeout seconds (instead of
* wait_timeout seconds) of inactivity before closing the connection
* </td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_CLIENT_SSL</b></td>
* <td>Use SSL (encryption)</td>
* </tr>
* </table>
* <p>
* For security reasons the <b>MULTI_STATEMENT</b> flag is
* not supported in PHP. If you want to execute multiple queries use the
* <b>mysqli_multi_query</b> function.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function real_connect(string $host = null, string $username = null, string $passwd = null, string $dbname = null, int $port = null, string $socket = null, int $flags = null): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Escapes special characters in a string for use in an SQL statement, taking into account the current charset of the connection
* @link http://php.net/manual/en/mysqli.real-escape-string.php
* @param string $escapestr <p>
* The string to be escaped.
* </p>
* <p>
* Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and
* Control-Z.
* </p>
* @return string an escaped string.
*/
public function real_escape_string(string $escapestr): string {}
/**
* (PHP 5 >= 5.3.0, PHP 7)<br/>
* Get result from async query
* @link http://php.net/manual/en/mysqli.reap-async-query.php
* @return mysqli_result <b>mysqli_result</b> in success, <b>FALSE</b> otherwise.
*/
public function reap_async_query(): mysqli_result {}
/**
* @param $string_to_escape
*/
public function escape_string($string_to_escape) {}
/**
* (PHP 5, PHP 7)<br/>
* Execute an SQL query
* @link http://php.net/manual/en/mysqli.real-query.php
* @param string $query <p>
* The query, as a string.
* </p>
* <p>
* Data inside the query should be properly escaped.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function real_query(string $query): bool {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Removes the named savepoint from the set of savepoints of the current transaction
* @link http://php.net/manual/en/mysqli.release-savepoint.php
* @param string $name <p>
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function release_savepoint(string $name): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Rolls back current transaction
* @link http://php.net/manual/en/mysqli.rollback.php
* @param int $flags [optional] <p>
* A bitmask of <b>MYSQLI_TRANS_COR_*</b> constants.
* </p>
* @param string $name [optional] <p>
* If provided then ROLLBACK/*name* / is executed.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function rollback(int $flags = null, string $name = null): bool {}
/**
* (PHP 5 >= 5.5.0, PHP 7)<br/>
* Set a named transaction savepoint
* @link http://php.net/manual/en/mysqli.savepoint.php
* @param string $name <p>
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function savepoint(string $name): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Selects the default database for database queries
* @link http://php.net/manual/en/mysqli.select-db.php
* @param string $dbname <p>
* The database name.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function select_db(string $dbname): bool {}
/**
* (PHP 5 >= 5.0.5, PHP 7)<br/>
* Sets the default client character set
* @link http://php.net/manual/en/mysqli.set-charset.php
* @param string $charset <p>
* The charset to be set as default.
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
public function set_charset(string $charset): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Alias of <b>mysqli_options</b>
* @link http://php.net/manual/en/function.mysqli-set-opt.php
* @param $option
* @param $value
*/
public function set_opt($option, $value) {}
/**
* (PHP 5, PHP 7)<br/>
* Used for establishing secure connections using SSL
* @link http://php.net/manual/en/mysqli.ssl-set.php
* @param string $key <p>
* The path name to the key file.
* </p>
* @param string $cert <p>
* The path name to the certificate file.
* </p>
* @param string $ca <p>
* The path name to the certificate authority file.
* </p>
* @param string $capath <p>
* The pathname to a directory that contains trusted SSL CA certificates
* in PEM format.
* </p>
* @param string $cipher <p>
* A list of allowable ciphers to use for SSL encryption.
* </p>
* @return bool This function always returns <b>TRUE</b> value. If SSL setup is
* incorrect <b>mysqli_real_connect</b> will return an error
* when you attempt to connect.
*/
public function ssl_set(string $key, string $cert, string $ca, string $capath, string $cipher): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Gets the current system status
* @link http://php.net/manual/en/mysqli.stat.php
* @return string A string describing the server status. <b>FALSE</b> if an error occurred.
*/
public function stat(): string {}
/**
* (PHP 5, PHP 7)<br/>
* Initializes a statement and returns an object for use with mysqli_stmt_prepare
* @link http://php.net/manual/en/mysqli.stmt-init.php
* @return mysqli_stmt an object.
*/
public function stmt_init(): mysqli_stmt {}
/**
* (PHP 5, PHP 7)<br/>
* Transfers a result set from the last query
* @link http://php.net/manual/en/mysqli.store-result.php
* @param int $option [optional] <p>
* The option that you want to set. It can be one of the following values:
* <table>
* Valid options
* <tr valign="top">
* <td>Name</td>
* <td>Description</td>
* </tr>
* <tr valign="top">
* <td><b>MYSQLI_STORE_RESULT_COPY_DATA</b></td>
* <td>Copy results from the internal mysqlnd buffer into the PHP variables fetched. By default,
* mysqlnd will use a reference logic to avoid copying and duplicating results held in memory.
* For certain result sets, for example, result sets with many small rows, the copy approach can
* reduce the overall memory usage because PHP variables holding results may be
* released earlier (available with mysqlnd only, since PHP 5.6.0)</td>
* </tr>
* </table>
* </p>
* @return mysqli_result a buffered result object or <b>FALSE</b> if an error occurred.
* </p>
* <p>
* <b>mysqli_store_result</b> returns <b>FALSE</b> in case the query
* didn't return a result set (if the query was, for example an INSERT
* statement). This function also returns <b>FALSE</b> if the reading of the
* result set failed. You can check if you have got an error by checking
* if <b>mysqli_error</b> doesn't return an empty string, if
* <b>mysqli_errno</b> returns a non zero value, or if
* <b>mysqli_field_count</b> returns a non zero value.
* Also possible reason for this function returning <b>FALSE</b> after
* successful call to <b>mysqli_query</b> can be too large
* result set (memory for it cannot be allocated). If
* <b>mysqli_field_count</b> returns a non-zero value, the
* statement should have produced a non-empty result set.
*/
public function store_result(int $option = null): mysqli_result {}
/**
* (PHP 5, PHP 7)<br/>
* Returns whether thread safety is given or not
* @link http://php.net/manual/en/mysqli.thread-safe.php
* @return bool <b>TRUE</b> if the client library is thread-safe, otherwise <b>FALSE</b>.
*/
public function thread_safe(): bool {}
/**
* (PHP 5, PHP 7)<br/>
* Initiate a result set retrieval
* @link http://php.net/manual/en/mysqli.use-result.php
* @return mysqli_result an unbuffered result object or <b>FALSE</b> if an error occurred.
*/
public function use_result(): mysqli_result {}
/**
* (PHP 5 <= 5.3.0)<br/>
* Refreshes
* @link http://php.net/manual/en/mysqli.refresh.php
* @param int $options <p>
* The options to refresh, using the MYSQLI_REFRESH_* constants as documented
* within the MySQLi constants documentation.
* </p>
* <p>
* See also the official MySQL Refresh
* documentation.
* </p>
* @return bool <b>TRUE</b> if the refresh was a success, otherwise <b>FALSE</b>
*/
public function refresh(int $options): bool {}
}
/**
* Represents a MySQL warning.
* @link http://php.net/manual/en/class.mysqli-warning.php
*/
final class mysqli_warning {
public $message;
public $sqlstate;
public $errno;
/**
* (PHP 5, PHP 7)<br/>
* The __construct purpose
* @link http://php.net/manual/en/mysqli-warning.construct.php
*/
protected function __construct() {}
/**
* (PHP 5, PHP 7)<br/>
* The next purpose
* @link http://php.net/manual/en/mysqli-warning.next.php
* @return void
*/
public function next() {}
}
/**
* Represents the result set obtained from a query against the database.
* @link http://php.net/manual/en/class.mysqli-result.php
*/
class mysqli_result implements Traversable {
public $current_field;
public $field_count;
public $lengths;
public $num_rows;