Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/10/2006, 11:31
Avatar de spider_boy
spider_boy
 
Fecha de Ingreso: diciembre-2003
Ubicación: Chile
Mensajes: 1.855
Antigüedad: 20 años, 5 meses
Puntos: 89
Error Clase SQL

Hola again...

Tengo otro problemita...

Tengo esta pequeña función
Código PHP:
public function sqlSelect($rows,$from,$where,$orderBy,$limit '')
{
if(!empty(
$orderBy) && empty($where) && empty($limit))    {
    
$this->select mysql_query("SELECT ".$rows." FROM ".$from." ORDER BY ".$orderBy);
}

if(
$this->select)    {
    return 
$this->select;
}    else    {
    return 
mysql_error();
}
        
return 
$this->select
Y luego la llamo de esta manera desde otra página...

Código PHP:
$b $personaje->sqlSelect("*","compraarmas","","armaID DESC","");
if(
is_string($b)) die($b); 
Lo del if(is_string...) me lo enseñó GatorV, así que lo utilizo para ver el error... Y este es... :

Código:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
No especifica nada, y me está volviendo loco... Gracias :)