Fixes for a deprecated call by reference.

This commit is contained in:
skeeter 2002-04-11 14:12:34 +00:00
parent 3f78583e6e
commit 33267908d2
5 changed files with 18 additions and 26 deletions

View File

@ -377,7 +377,7 @@
}
// Translate the type for the DBMS
if($this->m_oTranslator->TranslateType($sType, $iPrecision, $iScale, $sFieldSQL))
if($sFieldSQL = $this->m_oTranslator->TranslateType($sType, $iPrecision, $iScale))
{
if($bNullable == False)
{

View File

@ -24,10 +24,10 @@
}
/* Return a type suitable for DDL abstracted array */
function TranslateType($sType, $iPrecision = 0, $iScale = 0, &$sTranslated)
function TranslateType($sType, $iPrecision = 0, $iScale = 0)
{
$sTranslated = $sType;
return (strlen($sTranslated) > 0);
return $sTranslated;
}
function TranslateDefault($sDefault)

View File

@ -30,7 +30,7 @@
}
/* Return a type suitable for DDL */
function TranslateType($sType, $iPrecision = 0, $iScale = 0, &$sTranslated)
function TranslateType($sType, $iPrecision = 0, $iScale = 0)
{
$sTranslated = '';
switch($sType)
@ -98,8 +98,7 @@
}
break;
}
return (strlen($sTranslated) > 0);
return $sTranslated;
}
function TranslateDefault($sDefault)
@ -115,7 +114,7 @@
}
// Inverse of above, convert sql column types to array info
function rTranslateType($sType, $iPrecision = 0, $iScale = 0, &$sTranslated)
function rTranslateType($sType, $iPrecision = 0, $iScale = 0)
{
$sTranslated = '';
if ($sType == 'int' || $sType == 'tinyint' || $sType == 'smallint')
@ -182,8 +181,7 @@
$sTranslated = "'type' => '$sType'";
break;
}
return (strlen($sTranslated) > 0);
return $sTranslated;
}
function GetPKSQL($sFields)
@ -224,7 +222,7 @@
$prec = $scales[0];
$scale = $scales[1];
}
$this->rTranslateType($colinfo[0], $prec, $scale, &$type);
$type = $this->rTranslateType($colinfo[0], $prec, $scale);
if ($oProc->m_odb->f(2) == 'YES')
{

View File

@ -30,7 +30,7 @@
}
/* Return a type suitable for DDL */
function TranslateType($sType, $iPrecision = 0, $iScale = 0, &$sTranslated)
function TranslateType($sType, $iPrecision = 0, $iScale = 0)
{
$sTranslated = '';
switch($sType)
@ -102,8 +102,7 @@
}
break;
}
return (strlen($sTranslated) > 0);
return $sTranslated;
}
function TranslateDefault($sDefault)
@ -114,12 +113,11 @@
case 'current_timestamp':
return 'now';
}
return $sDefault;
}
/* Inverse of above, convert sql column types to array info */
function rTranslateType($sType, $iPrecision = 0, $iScale = 0, &$sTranslated = '')
function rTranslateType($sType, $iPrecision = 0, $iScale = 0)
{
$sTranslated = '';
if ($sType == 'int' || $sType == 'tinyint' || $sType == 'smallint' || $sType == 'bigint')
@ -190,8 +188,7 @@
$sTranslated = "'type' => '$sType'";
break;
}
return (strlen($sTranslated) > 0);
return $sTranslated;
}
function GetPKSQL($sFields)
@ -245,7 +242,7 @@
$prec = $scales[0];
$scale = $scales[1];
}
$this->rTranslateType($colinfo[0], $prec, $scale, $type);
$type = $this->rTranslateType($colinfo[0], $prec, $scale);
if ($oProc->m_odb->f(2) == 'YES')
{

View File

@ -34,7 +34,7 @@
}
/* Return a type suitable for DDL */
function TranslateType($sType, $iPrecision = 0, $iScale = 0, &$sTranslated)
function TranslateType($sType, $iPrecision = 0, $iScale = 0)
{
switch($sType)
{
@ -92,8 +92,7 @@
}
break;
}
return (strlen($sTranslated) > 0);
return $sTranslated;
}
function TranslateDefault($sDefault)
@ -104,12 +103,11 @@
case 'current_timestamp':
return 'now';
}
return $sDefault;
}
/* Inverse of above, convert sql column types to array info */
function rTranslateType($sType, $iPrecision = 0, $iScale = 0, &$sTranslated)
function rTranslateType($sType, $iPrecision = 0, $iScale = 0)
{
$sTranslated = '';
switch($sType)
@ -169,8 +167,7 @@
$sTranslated = "'type' => '$sType'";
break;
}
return (strlen($sTranslated) > 0);
return $sTranslated;
}
function GetPKSQL($sFields)
@ -274,7 +271,7 @@
$scale = 0;
}
$this->rTranslateType($sdb->f(2),$prec,$scale,$type);
$type = $this->rTranslateType($sdb->f(2), $prec, $scale);
$sql_get_default = "
SELECT d.adsrc AS rowdefault