Sorrow Posted November 29, 2006 Share Posted November 29, 2006 The thing i wanna do is to put the value returned by my query tothe variable $Photo[code]$SelPic = "SELECT NomPhoto FROM Imgprofil WHERE Id_Inscription = '".$_SESSION['Id_Inscription']."' " ;$Photo = mysql_query($SelPic);<?echo $Photo; ?>[/code]what am i doing wrong cause it is not working Quote Link to comment Share on other sites More sharing options...
fert Posted November 29, 2006 Share Posted November 29, 2006 you need to extract the values from the query with mysql_fetch_array Quote Link to comment Share on other sites More sharing options...
Sorrow Posted November 29, 2006 Author Share Posted November 29, 2006 ok but it is giving me an error when i am trying to do this: mysql_fetch_array(): supplied argument is not a valid MySQL result resource inHere is my code: [code]$SelPic = "SELECT NomPhoto FROM Imgprofil WHERE Id_Inscription = '".$_SESSION['Id_Inscription']."' " ;$Photo = mysql_fetch_array($SelPic);[/code] Quote Link to comment Share on other sites More sharing options...
fert Posted November 29, 2006 Share Posted November 29, 2006 [code]$pic=mysql_query("query");$Photo=mysql_fetch_array($pic);[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.