Getting a specific row in DataBase
Posted: Fri Oct 10, 2003 8:55 am
Hey 
mhh i m using access database (odbc)
so to get a row i use
odbc_fetch_row($queryexe)
but if i want to get a specific row (cuz the fetch row get my last row entered.. wich is good for what i ve done.. but now i want to be able to click on the client name and Then show all his info)
PS : i have a primary key that always get incremented (automaticaly) so i could like ask to display the row of the key i m asking.. but i m not sure of the syntaxe..
oh i m a noob..so i know it s not optimise 
thx
mhh i m using access database (odbc)
so to get a row i use
odbc_fetch_row($queryexe)
but if i want to get a specific row (cuz the fetch row get my last row entered.. wich is good for what i ve done.. but now i want to be able to click on the client name and Then show all his info)
PS : i have a primary key that always get incremented (automaticaly) so i could like ask to display the row of the key i m asking.. but i m not sure of the syntaxe..
Code: Select all
$connect = odbc_connect("tech_support", "kader", "edh") or die("Connection failed");
$query = "SELECT key FROM Clients";
$queryexe = odbc_do($connect, $query);
while(odbc_fetch_row($queryexe))
{
$varkey = odbc_result($queryexe, 1);
}
$var = $varkey;
if ($var == "NULL") {
$var == 1;
}else{
$var++;
}thx