|
@@ 417-426 (lines=10) @@
|
| 414 |
|
${'sql' . $n} = ''; |
| 415 |
|
//$zero_allowed = '1'; |
| 416 |
|
switch ($constr) { |
| 417 |
|
case 'equal': |
| 418 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 419 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
| 420 |
|
. ' d, ' |
| 421 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') |
| 422 |
|
. ' i LEFT JOIN ' |
| 423 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_item_text') |
| 424 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 425 |
|
$constraint = " = '" . $postvalue . '\''; |
| 426 |
|
break; |
| 427 |
|
case 'notequal': |
| 428 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 429 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
|
@@ 427-436 (lines=10) @@
|
| 424 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 425 |
|
$constraint = " = '" . $postvalue . '\''; |
| 426 |
|
break; |
| 427 |
|
case 'notequal': |
| 428 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 429 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
| 430 |
|
. ' d, ' |
| 431 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') |
| 432 |
|
. ' i LEFT JOIN ' |
| 433 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_item_text') |
| 434 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 435 |
|
$constraint = " <> '" . $postvalue . '\''; |
| 436 |
|
break; |
| 437 |
|
case 'contains': |
| 438 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 439 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
|
@@ 437-446 (lines=10) @@
|
| 434 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 435 |
|
$constraint = " <> '" . $postvalue . '\''; |
| 436 |
|
break; |
| 437 |
|
case 'contains': |
| 438 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 439 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
| 440 |
|
. ' d, ' |
| 441 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') |
| 442 |
|
. ' i LEFT JOIN ' |
| 443 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_item_text') |
| 444 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 445 |
|
$constraint = " LIKE '%" . $postvalue . "%'"; |
| 446 |
|
break; |
| 447 |
|
case 'notcontain': |
| 448 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 449 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
|
@@ 447-456 (lines=10) @@
|
| 444 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 445 |
|
$constraint = " LIKE '%" . $postvalue . "%'"; |
| 446 |
|
break; |
| 447 |
|
case 'notcontain': |
| 448 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 449 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
| 450 |
|
. ' d, ' |
| 451 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') |
| 452 |
|
. ' i LEFT JOIN ' |
| 453 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_item_text') |
| 454 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 455 |
|
$constraint = " NOT LIKE '%" . $postvalue . "%'"; |
| 456 |
|
break; |
| 457 |
|
case 'begins': |
| 458 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 459 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
|
@@ 457-466 (lines=10) @@
|
| 454 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 455 |
|
$constraint = " NOT LIKE '%" . $postvalue . "%'"; |
| 456 |
|
break; |
| 457 |
|
case 'begins': |
| 458 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 459 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
| 460 |
|
. ' d, ' |
| 461 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') |
| 462 |
|
. ' i LEFT JOIN ' |
| 463 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_item_text') |
| 464 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 465 |
|
$constraint = " LIKE '" . $postvalue . "%'"; |
| 466 |
|
break; |
| 467 |
|
case 'ends': |
| 468 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 469 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
|
@@ 467-476 (lines=10) @@
|
| 464 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 465 |
|
$constraint = " LIKE '" . $postvalue . "%'"; |
| 466 |
|
break; |
| 467 |
|
case 'ends': |
| 468 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 469 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
| 470 |
|
. ' d, ' |
| 471 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') |
| 472 |
|
. ' i LEFT JOIN ' |
| 473 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_item_text') |
| 474 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 475 |
|
$constraint = " LIKE '%" . $postvalue . '\''; |
| 476 |
|
break; |
| 477 |
|
case 'bigger': |
| 478 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 479 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
|
@@ 477-486 (lines=10) @@
|
| 474 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 475 |
|
$constraint = " LIKE '%" . $postvalue . '\''; |
| 476 |
|
break; |
| 477 |
|
case 'bigger': |
| 478 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 479 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
| 480 |
|
. ' d, ' |
| 481 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') |
| 482 |
|
. ' i LEFT JOIN ' |
| 483 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_item_text') |
| 484 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 485 |
|
$constraint = ' > ' . (int)$postvalue . ''; |
| 486 |
|
break; |
| 487 |
|
case 'smaller': |
| 488 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 489 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
|
@@ 487-496 (lines=10) @@
|
| 484 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 485 |
|
$constraint = ' > ' . (int)$postvalue . ''; |
| 486 |
|
break; |
| 487 |
|
case 'smaller': |
| 488 |
|
${'sql' . $n} .= 'SELECT DISTINCT i.itemid, i.title, i.uid, i.created, t.description FROM ' |
| 489 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_data') |
| 490 |
|
. ' d, ' |
| 491 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_items') |
| 492 |
|
. ' i LEFT JOIN ' |
| 493 |
|
. $xoopsDB->prefix($module->getVar('dirname', 'n') . '_item_text') |
| 494 |
|
. " t ON (t.itemid=i.itemid) WHERE d.itemid=i.itemid AND i.status='2'"; |
| 495 |
|
$constraint = ' < ' . (int)$postvalue . ''; |
| 496 |
|
break; |
| 497 |
|
default: |
| 498 |
|
break; |
| 499 |
|
} |