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>)";}?> Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/ 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 Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544911 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 ??? Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544915 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. Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544916 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. Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544918 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 Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544930 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){ ?> Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544973 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) { ?> Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544977 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 ??? Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544981 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. Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544983 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 Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-544991 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. Link to comment https://forums.phpfreaks.com/topic/106326-solved-php4-issues/#findComment-545002 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.