Jump to content


Photo

a sql question


  • Please log in to reply
2 replies to this topic

#1 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 22 May 2006 - 11:50 AM

$qury=select some thing from something where name ='john';
arra=fetch_array($qury);

echo arra['name'];

so if i got this code and then down on my page i just do this

$qury=select some thing from something where name ='juan';
arra=fetch_array($qury);

echo arra['name'];

will that mess with my cod in any way? becuase it does print the other name but since the variable and the query is the same would that bring any problem?

#2 samshel

samshel
  • Members
  • PipPipPip
  • Advanced Member
  • 837 posts

Posted 22 May 2006 - 12:16 PM

Hello,

No it wont create any problem....but i wont recomment using the same variable names as it would be very difficult to debug.

hth
Cheers,
SamShel
-----------------------------------------------
--: FUTURE IS LINUX :--
-----------------------------------------------

#3 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 22 May 2006 - 12:44 PM

thanx
and debuging is not a problem i use zend so i get very specific detail of where my problem is..




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users