Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member junglecat's Avatar
    Join Date
    Jul 2004
    Posts
    168

    Default Upgrading mysql broke a user's script

    I have a user with a double-opt in mailing list.

    After upgrading mysql to 5.0 this user is unable to send a mailing from his script. This is the error he gets:

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/user/public_html/admin/newmail.php on line 431

    I looked at line 431 of that page and see this:

    Code:
    $rows=mysql_num_rows($sql);
    Can I edit that line to make the script work? If so, how do I edit it?
    Idiot instructions only, please.
    ~~~~~~~~~~~~~
    ►►►Come join us at A Fun FRIENDLY Christian Forum◄◄◄

  2. #2
    ckh
    ckh is offline
    Member
    Join Date
    Dec 2003
    Posts
    333

    Default

    That line is basically saying nothing was found in the previous query. The code will probably resemble something like:

    $sql = mysql_query("SELECT * FROM table1", $link);
    $num_rows = mysql_num_rows($sql);

    So the actual query would be "Select * from table1"

    The problem probably isn't the query in itself but maybe a db that needs to be repaired or perhaps the connection to the db isn't being made causing the error.

    You may want to look at the logs or append the query to look like:

    $num_rows = mysql_num_rows($sql) or die(mysql_error());

    It will then show in more detail the mysql error.

  3. #3
    Member junglecat's Avatar
    Join Date
    Jul 2004
    Posts
    168

    Default

    Ok, I'll try to get more error detail and post again later.
    Idiot instructions only, please.
    ~~~~~~~~~~~~~
    ►►►Come join us at A Fun FRIENDLY Christian Forum◄◄◄

  4. #4
    Member junglecat's Avatar
    Join Date
    Jul 2004
    Posts
    168

    Default

    I'm getting a little lost. Can someone post idiot instructions for exactly what I do where?
    Idiot instructions only, please.
    ~~~~~~~~~~~~~
    ►►►Come join us at A Fun FRIENDLY Christian Forum◄◄◄

Similar Threads & Tags
Similar threads

  1. MySQL broke last night
    By erinspice in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 11-29-2007, 01:52 PM
  2. Update broke existing addon script installs.
    By saphetiger in forum cPanel Developers
    Replies: 1
    Last Post: 05-12-2007, 05:51 PM
  3. user account broke cause wrong i.p
    By roby2k in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-19-2006, 10:14 AM
  4. Adding MySQL user via script.
    By fwwebs in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-20-2004, 06:09 AM
  5. how to script MySQL db and user creation?
    By craigh in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-05-2004, 09:09 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube