mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
* Change example to use specific query rather than giving users the notion that running queries from user input is okay.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@262412 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
4f4310b1a9
commit
2eb6d7dae8
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="mysqli.field-count" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mysqli->field_count</refname>
|
||||
|
@ -60,7 +60,7 @@ $mysqli->query( "CREATE TABLE friends (id int, name varchar(20))");
|
|||
$mysqli->query( "INSERT INTO friends VALUES (1,'Hartmut'), (2, 'Ulf')");
|
||||
|
||||
|
||||
$mysqli->real_query($HTTP_POST_VARS['query']);
|
||||
$mysqli->real_query("SELECT * FROM friends");
|
||||
|
||||
if ($mysqli->field_count) {
|
||||
/* this was a select/show or describe query */
|
||||
|
@ -91,7 +91,7 @@ mysqli_query($link, "CREATE TABLE friends (id int, name varchar(20))");
|
|||
|
||||
mysqli_query($link, "INSERT INTO friends VALUES (1,'Hartmut'), (2, 'Ulf')");
|
||||
|
||||
mysqli_real_query($link, $HTTP_POST_VARS['query']);
|
||||
mysqli_real_query($link, "SELECT * FROM friends");
|
||||
|
||||
if (mysqli_field_count($link)) {
|
||||
/* this was a select/show or describe query */
|
||||
|
|
Loading…
Reference in a new issue