projects
/
cl7.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ADD Un début de simplification de mysql_query() par query()
[cl7.git]
/
php
/
mysql_tools.php
1
<?
php
# encoding:utf-8
2
3
# voir : http://us2.php.net/manual/en/function.func-num-args.php
4
5
function
query
(
$query
,
$a
,
$b
,
$c
,
$d
,
$e
)
6
{
7
if
(
$a
==
null
)
8
return
mysql_query
(
$query
);
9
if
(
$b
==
null
)
10
return
mysql_query
(
sprintf
(
$query
,
11
is_string
(
$a
) ?
mysql_real_escape_string
(
$a
) :
$a
12
));
13
}
14
15
?>