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. Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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. 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.