$tordb = new DB_Sql;
$tordb->Database = 'dbname';
$tordb->Host = 'host';
$tordb->User = 'username';
$tordb->Password = 'pasw';
$tordb->connect();
$sql="sql command";
$db->query($sql);
$aantal=$db->num_rows();
$db->next_Record();
$db->free();
<?php
function mysql_prep($string){
$mysql_connection_resource = mysql_connect('host', 'login', 'pawd');
$magic_quotes_active = get_magic_quotes_gpc();
$new_enough_php = function_exists("mysql_real_escape_string");
// i.e PHP >= v4.3.0
if ($new_enough_php) {
//undo any magic quote effects so mysql_real_escape_string can do the work
if ($magic_quotes_active) {
$string = stripslashes($string);
}
$new_string = mysql_real_escape_string($string);//, $mysql_connection_resource);
if (empty($new_string) && !empty($string)) {
die("mysql_real_escape_string failed."); //insert your error handling here
}
$string = $new_string;
} else { // before PHP v4.3.0
// if magic quotes aren't already on this add slashes manually
if (!$magic_quotes_active) {
$string = addslashes($string);
} //if magic quotes are active, then the slashes already exist
}
return $string;
}
?>
<?php
$html = JHTML::_('select.genericlist', $this->categories, 'catsid','size="1" class="inputbox required validate-catsid"', 'value', 'text', $this->row->catsid );
echo $html;
?>
Time to create page: 0.062 seconds