Re: Need help retreiving one record

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

 



you have to fetch results from query
use:
mysql_fetch_field
http://si2.php.net/manual/sl/function.mysql-fetch-field.php

"Jeroen Wasteels" <jeroenwasteels@xxxxxxxxx> wrote in message
news:20040107014212.12378.qmail@xxxxxxxxxxxxxxx
> I'm studying PHP now woth this manual, but it's rather fuzzy on how to
show
> data on screen obtained from a database, or how to assign a value of one
> record of the database to a variable I can use in my script.  Concrete,
this
> is the case: I would like to be able to assign to the variable
$TruePassword
> the value found in colomn Password at row $EneteredName, so I can compare
it
> to the password ppl enter when logging in.
>
> I hope this makes sense, if not please ask what I forgot to mention or
what
> I was unclear about.
>
> Thanks beforehand,
> Ondoron Bondoon
>
> btw, this is what I tried...
> <?php
> $Host="localhost";
> $Username="adminsithlore";
> $DBName="adminsithlore_uk_db";
> $Tablename="Login";
> $Connection = mysql_connect ($Host, $Username);
> $Mission= "select Password from $Tablename where (Name=\"Ondoron
> Bondoon\")";
> $Result= mysql_db_query($DBName, $Mission, $Connection);
> if ($Result) {
> print ("$Result");
> }
>
> print("<br/> $tryname, $trypassword");
> mysql_close ($Connection);
> ?>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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

  Powered by Linux