Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
MySQL hates me. PHP ain't too fond either
Results 1 to 3 of 3

Thread: MySQL hates me. PHP ain't too fond either

  1. #1

    MySQL hates me. PHP ain't too fond either

    can anyone tell me what's wrong with the following code?
    Trying to get php to grab the posible values of group and make a nice <select>.
    Thing is I use (almost) the same code, on a different table in the same db and it works like a charm.
    Code:
    <?php
    
    //connect to db
    $conn = mysql_connect("localhost", "dbusr", "somepassword") or die("Invalid server or user");
    
    //select db
    mysql_select_db("roombook", $conn);
    
    $result=mysql_query("SELECT DISTINCT group FROM links", $conn);
    
    while ($myrow=mysql_fetch_array($result)) {
    
     * * *echo"<option value=\"".$myrow["group"]."\">".$myrow["group"]."</option>\n";
    
     * * *}
    
    
    ?>
    I get this error:
    supplied argument is not a valid MySQL result resource
    It craps out at the "while". I did a search for it but all I can find is sites who have this error in thier code.

    If I change the query to another field same table it works.

    Is the name "group" a restricted name or something?

  2. #2

    Re: MySQL hates me. PHP ain't too fond either

    never mind, it must be a restricted name.
    I changed the row name to intgroup and it works fine.


    --edit--
    It must be a PHP thing, as the query came back fine through myadmin, which was what confused me :

  3. #3
    Mentor coltrane's Avatar
    Join Date
    May 2001
    Location
    North Carolina
    Posts
    1,390

    Re: MySQL hates me. PHP ain't too fond either

    now see.................
    MySQL and PHP are not your enemies

    But Microsoft and other large corporations are

Similar Threads

  1. Problem starting mysql conflicts with the RPM "mysql-5.0.27-1.fc6"
    By kamakshiganesh in forum Redhat / Fedora
    Replies: 2
    Last Post: 10-26-2007, 04:35 AM
  2. Gentoo hates me
    By Wildheart in forum Linux - General Topics
    Replies: 7
    Last Post: 07-02-2005, 08:44 PM
  3. php / mysql
    By kornp in forum Linux - Hardware, Networking & Security
    Replies: 5
    Last Post: 05-07-2002, 02:25 PM
  4. mysql ver 49a
    By elovkoff in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 03-09-2002, 11:38 PM
  5. XFree86 hates me
    By korn in forum Linux - General Topics
    Replies: 27
    Last Post: 12-10-2001, 11:11 PM

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
  •