darkfreaks Posted May 19, 2008 Share Posted May 19, 2008 ok so i am running on PHP4 and MYSQL 5 everything seems to work right when i changed the fields the guy who coded this told me it would work on my site if i changed all the appropriate fields so now i get "mysql_num_rows not a valid function" . num_rows lines: <?php if(mysql_num_rows($get1)<1){echo"You can only give me items you own! (<a href=wizelscove.php>Back</a>)";} if(mysql_num_rows($get2)<1){echo"You can only give me items you own! (<a href=wizelscove.php>Back</a>)";} if(mysql_num_rows($find)<1){echo"<b>$get1[item_id]</b> and a <b>$get2[item_id]</b>? I've never heard of such a combination. ..Best not to dabble in what we're not experienced with, don't you agree? (<a href=wizelscove.php>Back</a>)";}?> Quote Link to comment Share on other sites More sharing options...
corbin Posted May 19, 2008 Share Posted May 19, 2008 Errr.... That means the MySQL function isn't enabled. http://www.phpfreaks.com/forums/index.php/topic,95378.0.html Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted May 19, 2008 Author Share Posted May 19, 2008 so should i update to PHP5 i am still on PHP4 ??? Quote Link to comment Share on other sites More sharing options...
947740 Posted May 19, 2008 Share Posted May 19, 2008 PHP4 is fine, you just have to install the MySQL libraries. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted May 19, 2008 Author Share Posted May 19, 2008 can you link me? i have no clue what you are talking about. i am running MYSQL version 4. Quote Link to comment Share on other sites More sharing options...
947740 Posted May 19, 2008 Share Posted May 19, 2008 Depends what OS you have. I would try this first: http://www.ricocheting.com/server/mysql.html You might find something else of interest here: http://www.google.com/search?hl=en&q=installing+mysql+with+php Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted May 19, 2008 Author Share Posted May 19, 2008 somehow i might think it is a code problem <?php $query=mysql_query("SELECT id FROM useritems2"); $row=mysql_num_rows($query); //problem line if($row>1){ ?> Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 19, 2008 Share Posted May 19, 2008 somehow i might think it is a coe problem you might be wrong. the error "mysql_num_rows not a valid function" says what it means: the function mysql_num_rows is not in your installation. but that makes me wonder why you don't get the same error using the mysql_query function. maybe try this to see if mysql_query is running okay.: <?php $query = mysql_query("SELECT id FROM useritems2") or die(mysql_error()); echo "query: $query"; // see what you get here. $row = mysql_num_rows($query); //problem line if ($row>1) { ?> Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted May 19, 2008 Author Share Posted May 19, 2008 mysql_query is running fine maybe i need to check with my host to make sure the num_rows function is installed correctly ??? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 19, 2008 Share Posted May 19, 2008 mysql_num_rows comes with php mysql. it's all or nothing. you can't install individual functions. i have no idea why you'd get that error. if you can use mysql_query() but not mysql_num_rows(), something must be really hosed in your php installation. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted May 19, 2008 Author Share Posted May 19, 2008 i send an email to my host so hopefully they will look at there own PHP4 config and determine whats wrong Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted May 19, 2008 Share Posted May 19, 2008 If you post the exact error message you are getting, someone can probably help. 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.