Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    32
    Thanks
    15
    Thanked 0 Times in 0 Posts

    expects parameter, boolean given

    Hello,

    An elderly gentleman has asked me to get an old PHP/MYSQL site working, he supplied it on CD. I've uploaded it to my server, made a new database and imported his old one with new user / password etc etc.

    It's a VERY dated site and I'm going to persuade him to have a new one but when I make a selection from the pull-downs on the left I get this, plus other errors:

    Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/ncapc605/public_html/mintinbox/config/functies.php on line 298

    Have a look at: http://mintinbox.leemingdesign.co.uk/

    Ps... man who made original site was Dutch and is now dead so there's not much chance of any help from him.

    He's set on having this up an running, so is it worth investigating a solution to this error or what?

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,298
    Thanks
    57
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    What that means is that instead of being supplied with a mysql resource such as a result set, the function was supplied with a true or false instead (which is called a boolean).

    There is nothing we can do to help without seeing the source code. Giving us the url means nothing as we can only see html but naturally in a php forum..
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • Users who have thanked tangoforce for this post:

    Jimbolgs (11-22-2012)

  • #3
    New Coder
    Join Date
    Nov 2011
    Posts
    32
    Thanks
    15
    Thanked 0 Times in 0 Posts
    The PHP is approx 1,300 lines — do you want it all or just the lines producing the errors?

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,298
    Thanks
    57
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    The forum won't let you post that amount so if I were you, just the relevant code.

    I'm puzzled though as to why this is an issue if you're going to make a new site anyway?
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #5
    New Coder
    Join Date
    Nov 2011
    Posts
    32
    Thanks
    15
    Thanked 0 Times in 0 Posts
    The guy is nearly 70 and I'd like to be able to tell him why it's not working rather than just trying to sell him a new site.

    Don't worry about it, thanks for your help but the site's probably not worth bothering with.

  • #6
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,298
    Thanks
    57
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    Quote Originally Posted by Jimbolgs View Post
    Don't worry about it, thanks for your help but the site's probably not worth bothering with.
    ? Whats with the sudden change?

    Post the code, we'll have a look.

    I suspect it's one of two things:
    1) Database connection failure
    2) Bad query / database isn't intact.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •