using variables with odbc database
Posted: Wed Jul 26, 2006 11:28 am
Hello, I am having great trouble adapting to code with an ODBC database!
Can someone help me by showing me how to make a query from an ODBC database and then assigning the results into variables.
E.G
$sql=Select ID, NAME, LAST_NAME FROM DATABASE WHERE id=$id;
Then put the values (ID, NAME and LAST_NAME) obtained from the database into variables $ID, $NAME, $LAST_NAME
Another question:
I’ve got 3 variables ($ID1, $ID2, $ID3) containing (152,168,335, respectively)
What would the php command be to make a variable = 152-168-335 and not 655 (=152+168+355)
Cheers guys!
Can someone help me by showing me how to make a query from an ODBC database and then assigning the results into variables.
E.G
$sql=Select ID, NAME, LAST_NAME FROM DATABASE WHERE id=$id;
Then put the values (ID, NAME and LAST_NAME) obtained from the database into variables $ID, $NAME, $LAST_NAME
Another question:
I’ve got 3 variables ($ID1, $ID2, $ID3) containing (152,168,335, respectively)
What would the php command be to make a variable = 152-168-335 and not 655 (=152+168+355)
Cheers guys!