I ran the following command to change the status field from a varchar
text to ENUM("Input","Published") NOT NULL

$sql = "ALTER TABLE $table_name 
                CHANGE status 
                status ENUM(\"Input\",\"Published\") NOT NULL 
        ";

The changes took effect according to the command

mysql_list_fields($db_name, $table_name, $connection) 

HOWEVER, that did not change any of the results. Sorting the table by
the status field in the table produces empty status fields, followed
by "Input" and "Published."  Sorting by another field (lname, for
instance) produces "Published" in the previously "empty" status. All
of the "bad" records are "Published" and none (as far as I've found
yet) are "Input."



--- John Hughes <[EMAIL PROTECTED]> wrote:
> 
> --- DL Neil <[EMAIL PROTECTED]> wrote:
> > John,
> > 
> > > I tried using LIKE \"%published%\" and even LIKE \"%ub%\"  The
> > > results are the same as when I attempt = \"published\"
> > >
> > > Something in the query processing works differently when = is
> > used in
> > > the WHERE.
> > >
> > > I can see no explanation in the data stored in the table.
> > 
> > The important thing is what MySQL 'sees'!
> > 
> > You've already started testing your premise <<<ASSUMING all
> records
> > are
> > either "input" or "published">>> One suggestion would be to use
> the
> > MySQL client for investigations, then if you don't get the same
> > result
> > from PHP you have a hint of where the problem lies.
> 
> [snip]
> 
> OK, now I'm REALLY puzzled. 
> 
> I executed this query: 
> 
> $sql = "SELECT * 
>       FROM $table_name 
>       ORDER BY status
>       ";
> 
> Sure enough, mysql found no value in status about a third of the
> time. (The table comes back with the empty status rows, then
> "input"
> and finally "published.")  This explains why WHERE status =
> "published" doesn't return the same results as WHERE status <>
> "input".
> 
> But here's the rub: 
> 
> When I do an individual check on each of the "empty" status
> records,
> every one of them has "published" in the status field and the
> status
> shows as "published" when I sort by a different field than
> "status."
> 
> How can the data be in the record when I ORDER BY "lname" (a
> varchar
> text field) and no data be found when I ORDER BY "status" (a
> varchar
> text field)?
> 
> John Hughes
> 
>  
> 
> 
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - sign up for Fantasy Baseball
> http://sports.yahoo.com
> 
>
---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try:
> http://lists.mysql.com/php/unsubscribe.php
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to