16 require
'../../../_src/_config.php';
19 $tx =
'SELECT standard: ' . PHP_EOL;
20 $tx .= print_r(
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE __label__ LIKE "%ova1%"' ),
true );
23 $tx .=
'SELECT preparata: ' . PHP_EOL;
24 $tx .= print_r(
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE __label__ LIKE ?', array( array(
's' =>
'%pr%' ) ) ),
true );
27 $tx .=
'SELECT preparata di test sulla colonna nome: ' . PHP_EOL;
28 $tx .= print_r(
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE nome LIKE ?', array( array(
's' =>
'%pr%' ) ) ),
true );
31 $tx .=
'SELECT preparata di test sulla colonna __label__ senza LIKE: ' . PHP_EOL;
32 $tx .= print_r(
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE __label__ = ?', array( array(
's' =>
'prova1' ) ) ),
true );
35 $tx .=
'SELECT preparata di test sulla colonna __label__ senza wildcards: ' . PHP_EOL;
36 $tx .= print_r(
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE __label__ LIKE ?', array( array(
's' =>
'prova1 > prova11' ) ) ),
true );
39 $tx .=
'SELECT preparata con concatenazione delle wildcards: ' . PHP_EOL;
40 $tx .= print_r(
mysqlQuery(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE __label__ LIKE CONCAT(\'%\',?,\'%\')', array( array(
's' =>
'pr' ) ) ),
true );
43 $tx .=
'SELECT con bind "naturale": ' . PHP_EOL;
44 $pq = mysqli_prepare(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE __label__ LIKE ?' );
46 mysqli_stmt_bind_param(
$pq,
's',
$lk);
47 mysqli_stmt_execute(
$pq );
49 $tx .= mysqli_errno(
$cf[
'mysql'][
'connection'] ) .
' ' . mysqli_error(
$cf[
'mysql'][
'connection'] ) . PHP_EOL;
50 mysqli_stmt_close(
$pq );
53 $tx .=
'SELECT con bind "naturale" e convert: ' . PHP_EOL;
54 $pq = mysqli_prepare(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE convert( __label__ using utf8 ) LIKE ?' );
56 mysqli_stmt_bind_param(
$pq,
's',
$lk);
57 mysqli_stmt_execute(
$pq );
59 $tx .= mysqli_errno(
$cf[
'mysql'][
'connection'] ) .
' ' . mysqli_error(
$cf[
'mysql'][
'connection'] ) . PHP_EOL;
60 mysqli_stmt_close(
$pq );
63 $tx .=
'SELECT con bind "naturale" e collate: ' . PHP_EOL;
64 $pq = mysqli_prepare(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE __label__ LIKE ? COLLATE utf8_unicode_ci' );
66 mysqli_stmt_bind_param(
$pq,
's',
$lk);
67 mysqli_stmt_execute(
$pq );
69 $tx .= mysqli_errno(
$cf[
'mysql'][
'connection'] ) .
' ' . mysqli_error(
$cf[
'mysql'][
'connection'] ) . PHP_EOL;
70 mysqli_stmt_close(
$pq );
73 $tx .=
'SELECT con bind "naturale" sulla colonna nome: ' . PHP_EOL;
74 $pq = mysqli_prepare(
$cf[
'mysql'][
'connection'],
'SELECT * FROM categorie_prodotti_view WHERE nome LIKE ?' );
76 mysqli_stmt_bind_param(
$pq,
's',
$lk);
77 mysqli_stmt_execute(
$pq );
79 $tx .= mysqli_errno(
$cf[
'mysql'][
'connection'] ) .
' ' . mysqli_error(
$cf[
'mysql'][
'connection'] ) . PHP_EOL;
80 mysqli_stmt_close(
$pq );
$cf['ricerca']['template']