Ver Mensaje Individual
  #6 (permalink)  
Antiguo 10/01/2014, 11:32
Avatar de adryan310
adryan310
 
Fecha de Ingreso: septiembre-2012
Mensajes: 450
Antigüedad: 11 años, 8 meses
Puntos: 3
Pregunta Respuesta: Error en consulta a la b.d con PHP y PDO

Entiendo amigo pues esa consulta primero la probe en SQL-SERVER y me funciono bien, pero cuando la ejecute desde mi PHP no me funko y no tengo idea del por que ya que soy algo nuevo en PHP y estoy practicando para aprender mas sobre esto. Agrege lo siguiente para ver la exception pero me imprime el mismo error que puse en rojo al inicio del post...

PHP:
Código PHP:
 try{
               
$strDataGames $strConnect->query$strQueryGames );    
               
               while(
$dataGames $strDataGames->fetch(PDO::FETCH_ASSOC)){
                     
$response  "<tr>";
                     
$response .= "<td>".$dataGames['Time']."</td>";
                     
$response .= "<td>".$dataGames['NumGame']."</td>";
                     
$response .= "<td>".$dataGames['Teams']."</td>";
                     
$response .= "<td>".$dataGames['PeriodDescription']."</td>";
                     
$response .= "<td>".$dataGames['Score']."</td>";
                     
$response .= "<td>".$dataGames['Tickets']."</td>";
                     
$response .= "<td>".$dataGames['Risk']."</td>";
                     
$response .= "<td>-275</td>";
                     
$response .= "<td>-17517</td>";
                     
$response .= "<td><a href='#' rel='".$_POST['value']."' onClick='openInfoAgent(this);'>".$_POST['value']."</a></td>";
                     
$response .= "</tr>";    
               }
            }catch(
PDOException $e){
                
error_log("class->search.php->PDOException = ".$e);
            }