karimali831 Posted February 19, 2010 Share Posted February 19, 2010 Hi, I want to use: if(mysql_num_rows($ergebnis2)==2) how can the value 2, be retrieved from the database? example, lets say I have if (mysql_num_rows($ergebnis2)==$limit) $limit = $ds['limit']; also query: safe_query("SELECT limit FROM ".PREFIX."settings WHERE limit = '$limit'")); but this is wrong. I'm php beginner. Can someone help me please build this together? thanks for any help at all. Link to comment https://forums.phpfreaks.com/topic/192591-mysq_num_rows/ Share on other sites More sharing options...
trq Posted February 19, 2010 Share Posted February 19, 2010 Its not real clear what your asking. mysql_num_rows returns the number of rows contained within your result resource. Link to comment https://forums.phpfreaks.com/topic/192591-mysq_num_rows/#findComment-1014659 Share on other sites More sharing options...
karimali831 Posted February 19, 2010 Author Share Posted February 19, 2010 yes and with: if(mysql_num_rows($ergebnis2)==2) echo '2 results'; it counts 2, but I want this value to be retrieved from a table? still no understand? Link to comment https://forums.phpfreaks.com/topic/192591-mysq_num_rows/#findComment-1014661 Share on other sites More sharing options...
trq Posted February 19, 2010 Share Posted February 19, 2010 yes and with: if(mysql_num_rows($ergebnis2)==2) echo '2 results'; it counts 2, but I want this value to be retrieved from a table? still no understand? Nope. Still makes little sense. Link to comment https://forums.phpfreaks.com/topic/192591-mysq_num_rows/#findComment-1014764 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.