Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2009
    Thanked 0 Times in 0 Posts

    Error reporting problem

    im getting this error when i run a script

    mysql_query(): supplied argument is not a valid MySQL-Link resource

    what do i have to do to echo out the actual error and what line its on like this

    Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/www/ikhelper.freehostia.com/globinc/loginfunc.php on line 87

    iv tried inserting error_reporting(E_ERROR | E_WARNING | E_PARSE); and


    but doesnt output any error

  • #2
    Super Moderator
    Join Date
    May 2002
    Perth Australia
    Thanked 101 Times in 99 Posts
    you wont get what you want via error_reporting(); since its a mysql error not a php error, in your queries try ...
    PHP Code:
    mysql_query($sql) or die(__FILE__.' '.__LINE__.mysql_error()); 
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


    Posting Permissions

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