SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    [Call me Bram] iBram007's Avatar
    Join Date
    Feb 2001
    Location
    Belgium
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Windows vs Linux

    Hello,

    I've writed a news script, and it works on a windows machine (apache/php4/mysql), but it doesn't work under linux (apache/php4/mysql).

    This line gives an error on a windows machine:
    PHP Code:
    <? $q "SELECT addpost, modpost, delpost FROM $table_users where name = '$username'";
    $q2 mysql_query($q);
    list(
    $add,$mod,$del) = mysql_fetch_row($q2); ?>
    error:
    Warning: Supplied argument is not a valid MySQL result resource in /home/bramstart/public_html/ibwds/demo/news/admin/panel.php on line 26

    I'm sure all settings are right, because I could create tables with my install script, add new users for my script, etc...

    Line 26 is thisone: list($add,$mod,$del) = mysql_fetch_row($q2);

  2. #2
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Warning: Supplied argument is not a valid MySQL result resource in /home/bramstart/public_html/ibwds/demo/news/admin/panel.php on line 26
    That means that it isn't getting any results does it not? Or the results it is getting out of the mysql_query are not valid results (whatever that means), I would check to see that there are things for it to fetch and see if that resolves the problem.
    Oh no! the coots are eating my nodes!

  3. #3
    [Call me Bram] iBram007's Avatar
    Join Date
    Feb 2001
    Location
    Belgium
    Posts
    339
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stupid mistake of me

    I did close the db connection in an included file

  4. #4
    SitePoint Addict kunal's Avatar
    Join Date
    Oct 2000
    Posts
    307
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by iBram007
    Stupid mistake of me

    I did close the db connection in an included file

    hehe.. the pleasures of using include()..
    i dunno...


Bookmarks

Posting Permissions

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