
03-30-2010, 10:31 PM
|
|
|
Join Date: Feb 2008
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by ysam
I found a bug that at least in my system exists. Every field that uses getRecordById() fails badly. I can't figure out why you are using direct mysql functions only in that function.
Anyway if anybody has problems not displaying Departments, Products and posters etc.. This is what you have to do.
in microsupport/includes/functions.php
replace
Code:
// Get record by Id
function getRecordById($tablename, $id, $rowname = 'id')
{
global $db, $vbulletin;
$result = $db->query_read("SELECT * FROM ".TABLE_PREFIX."".$tablename." WHERE ".$rowname."=".$id." LIMIT 1");
if(!$result) return array ("id" => 0, "name" => '');
if(mysql_num_rows($result) == 0) return array ("id" => 0, "name" => '');
$ret = array();
while($row = mysql_fetch_assoc($result)) {
$ret = $row;
}
mysql_free_result($result);
return $ret;
}
With..
Code:
// Get record by Id
function getRecordById($tablename, $id, $rowname = 'id')
{
global $db, $vbulletin;
$result = $db->query_read("SELECT * FROM ".TABLE_PREFIX."".$tablename." WHERE ".$rowname."=".$id." LIMIT 1");
if(!$result) return array ("id" => 0, "name" => '');
if($db->num_rows($result) == 0) return array ("id" => 0, "name" => '');
$ret = array();
while($row = $db->fetch_array($result)) {
$ret = $row;
}
mysql_free_result($result);
return $ret;
}
This is for 4.4.2 free version.
-Yiannis
|
thanks buddy, solved my problem
|