|  | Posted by jj on 01/12/06 20:25 
Thats the thing, I can try to do it via PHP or via My SQL Query Browser andsame thing happens, no error just reverts back to the old value.
 
 I tried the solution you gave, by putting the discountID as PK and leaving
 the discount column as a non PK.
 The value can now be changed.
 
 
 
 
 
 "Jon" <jonra@netins.com> wrote in message
 news:dpumpi$osl$1@news.netins.net...
 > While you should be able to change it, it doesn't feel like good data
 > practice to me. I'd go back and set that table to be 2 fields personally -
 a
 > discountID, and a discount. Even if it's only one record it's a better way
 > to handle the data (obviously just one man's opinion and open to debate).
 >
 > When you say you're trying to update it, is that just within PHP pages?
 Have
 > you tried going in and editing it manually in the DB via a command line or
 > admin tool at all? It should throw an error if a PHP isn't updating it
 > (assuming you have PHP error displaying on), so it's almost as if the
 query
 > isn't running at all.
 >
 > "J.O. Aho" <user@example.net> wrote in message
 > news:42fj1aF1gta2bU1@individual.net...
 > > jj wrote:
 > >> Thanks for the reply.
 > >>
 > >> My problem isnt that there are duplicates.  My table is as simple as it
 > >> possibly gets:
 > >>
 > >>
 > >> table name : UPS
 > >>
 > >> --------------
 > >> discount(PK)
 > >> --------------
 > >> 0.33
 > >> --------------
 > >>
 > >> It only has one value in the entire table.
 > >>
 > >> Now if I try to alter the 0.33 to any value it just reverts back to the
 > >> 0.33.  No error is given at all either.
 > >
 > > Okey, what SQL server do you use (name and version)?
 > > What about does the user you logged into the SQL server has the right to
 > > modify it? There is the GRANT that will be needed to be issued by the
 SQL
 > > admin user to allow other users to get the priviliges to do different
 > > things
 > > with databases and tables.
 > >
 > > You can try the ALTER to modify the table so that the column no longer
 > > will be
 > > the primary key.
 > >
 > >
 > > For Mysql:
 > > http://dev.mysql.com/doc/refman/5.0/en/grant.html
 > > http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
 > >
 > >
 > > //Aho
 >
 >
  Navigation: [Reply to this message] |