Space in table(mysql) : echo value on screen

Codes here !

Moderators: macek, egami, gesf

serge
New php-forum User
New php-forum User
Posts: 14
Joined: Mon Sep 16, 2002 1:25 am
Location: Ukraine
Contact:

Postby serge » Fri Oct 25, 2002 4:21 am

Try to use odbc_result:


Code: Select all

$cx=odbc_connect('something');
$cur=odbc_exec($cx,"select [my own id],pass from table_name");
while(odbc_fetch_row($cur)){
$id=odbc_result($cur,1);
$pass=odbc_result($cur,2);
echo "id:$id,pass:$pass";
}


More simle: use aliases in SQL query:
"SELECT [my own id] AS id,pass ..."
then

$id=$row->id


------------------------
With best regards,
Serge Bulanov
AlarIT Web developer,
www.AlarIT.com

DoppyNL

Postby DoppyNL » Fri Oct 25, 2002 5:07 am

or use $row['telefone 2']

Greetz Daan


Return to “mySQL & php coding”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest