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 Link to comment https://forums.phpfreaks.com/topic/28814-little-help-for-variable-declaration/ 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 Link to comment https://forums.phpfreaks.com/topic/28814-little-help-for-variable-declaration/#findComment-131912 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] Link to comment https://forums.phpfreaks.com/topic/28814-little-help-for-variable-declaration/#findComment-131913 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] Link to comment https://forums.phpfreaks.com/topic/28814-little-help-for-variable-declaration/#findComment-131917 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.