Fw: SELECT problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----- 
From: Sabina A. Schneider 
To: Wee Keat (VisualDensity] 
Sent: 17 January, 2003 4:38 PM
Subject: Re:  SELECT problem


    Yes!!! Sorry!!! Here it is:

$con=conectar(0,$s_conectado_ctr);


/*Validacion de usuario*/

$sql="SELECT password FROM usuario_sistema WHERE usuario='$f_usuario'";

$result_usuario_sistema=mysql_query($sql,$con);

$row_usuario_sistema=mysql_fetch_row($result_usuario_sistema);



Conectar(..) is a function like this:

function conectar($validar,$conectado){

if($validar)

$aux=controlar($validar,$conectado);

else

$aux=1;


if($aux){


$host="localhost";

$user="invitado";

$password="CA1245";

$con="";


$con=mysql_connect($host,$user,$password); 

if($con){

mysql_select_db("chat",$con);

}


}

return($con);


}



function controlar($validar,$conectado){

$aux=0;

if(!(($validar AND $conectado)OR($validar==0))){ ?>


<P><I> Debe conectarse primero. </I><P>

<FORM ACTION="index.php" METHOD=POST>

<INPUT TYPE=SUBMIT VALUE='Aceptar'>

</FORM>


<? }

else

$aux=1;

return($aux);


}

  ----- Original Message ----- 
  From: Wee Keat (VisualDensity] 
  To: Sabina A. Schneider 
  Sent: Friday, January 17, 2003 2:29 AM
  Subject: Re:  SELECT problem


  may we have a look at your line 18 or the select statement?
    ----- Original Message ----- 
    From: Sabina A. Schneider 
    To: php-db@lists.php.net 
    Sent: 17 January, 2003 4:25 PM
    Subject:  SELECT problem


        Hello PHP world!!! i've just finisched installing Apache 1.3.27 with PHP4 and 1.4 in Windows 2000. I've installed all off the scripts that function all right in Linux Red Hat in Windows 2000, but when it comes to do a simple select to a table that does exist and the select is all right there appears a message as if the query weren't all right at all:
    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in g:\apache\apache\htdocs\digimedia\adm_central\index.php on line 18

        What could it be? I really appreciate the great help you have been giving to me these days. Thank you very much!!!



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux