The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Question about input cleaner class
I have been trying to do all code goingforward utilizing vb's input cleaner class as opposed to $_GET, $_POST, $_REQUEST, etc... but it doesn't seem to want to cooperate with me... The block of code i havew which works fine as-is, is:
Code:
$sql = "SELECT " . TABLE_PREFIX . "erc_artistmbr.*, " . TABLE_PREFIX . "erc_artist.artisttitle FROM " . TABLE_PREFIX . "erc_artistmbr LEFT JOIN " . TABLE_PREFIX . "erc_artist ON " . TABLE_PREFIX . "erc_artist.artistid = " . TABLE_PREFIX . "erc_artistmbr.artistid "; if ($_GET['artistid']) { $sql .= " WHERE " . TABLE_PREFIX . "erc_artistmbr.artistid = '".$_GET['artistid']."'"; } $sql .= " ORDER BY " . TABLE_PREFIX . "erc_artist.artisttitle, erc_artistmbr.displayorder"; $artistmbrs = $db->query_read($sql); Code:
$getartistid = $vbulletin->input->clean_gpc('g', 'artistid', TYPE_INT); $sql = "SELECT " . TABLE_PREFIX . "erc_artistmbr.*, " . TABLE_PREFIX . "erc_artist.artisttitle FROM " . TABLE_PREFIX . "erc_artistmbr LEFT JOIN " . TABLE_PREFIX . "erc_artist ON " . TABLE_PREFIX . "erc_artist.artistid = " . TABLE_PREFIX . "erc_artistmbr.artistid "; if ($getartistid) { $sql .= " WHERE " . TABLE_PREFIX . "erc_artistmbr.artistid = '$getartistid'"; } $sql .= " ORDER BY " . TABLE_PREFIX . "erc_artist.artisttitle, erc_artistmbr.displayorder"; $artistmbrs = $db->query_read($sql); Thanks! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|