Space in table(mysql) : echo value on screen

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
Try to use odbc_result:


Code:
$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
 
Back
Top