|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
retreaving values
Hi all,
in my php script I need to retreave a value from a table and add it to another table. In my script I have. PHP Code:
then I try to add the value of $curRate to another table using this code PHP Code:
but this doesn't quite work for me. I get "Resource i" inseted in the curRate culumn. I don't know where this Resource i came from. can anyone please help me = ) Qutaibah |
|
#2
|
|||
|
|||
|
mysql_query returns a resource result that has to be processed using for example mysql_fetch_row or mysql_result..
Try using this code instead PHP Code:
and then PHP Code:
That should work! ![]() Read about mysq_result: http://www.php.net/manual/en/function.mysql-result.php Read about the different mysql-functions: http://www.php.net/manual/en/ref.mysql.php
__________________
Best Regards, Håvard Lindset |
|
#3
|
|||
|
|||
|
Not working = (
Thanks for the fast respond,
I see the logic of mysql_result() but it's not really working. I think it's something minor. I'll go and try to move things around maybe I'll find what's wrong with the code. Qutaibah |
|
#4
|
|||
|
|||
|
I worked = )
Hi Lindset,
like I said it was silly mistake that was messing up everything. but now it's workin just fine. and I understand what a resource is. so I am all happy =) thanks for your help Qutaibah |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > retreaving values |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|