Jump to content

Unknown column 'instructions' in 'field list'

- - - - -

  • Please log in to reply
3 replies to this topic

#1
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
I have a table called medications. One of the fields in this table is instructions. when I run an insert I get this:

Quote

Unknown column 'instructions' in 'field list'

After looking into it this is apparently a problem that occurs when MySQL is upgraded improperly. After checking google I find that running the following should fix it:
ALTER TABLE `medications` ADD `instructions` longtext NOT NULL DEFAULT ''

needless to say it did not. I run on shared hosting so i can't re-install. Any sugestions?

Thanks,
~ZeroRadius
Posted Image

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
Hello ZeroRadius, can you show us an example (if not paraphrased to the same syntax) your INSERT query that fails?

Usually such an issue would relate to incorrect quoting, reserved words, malformed strings. Maybe it is as simple as that.

Have you or your host tried to restart the MySQL server to clear any caching that may be an issue?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
:lol: I made a stupid mistake (this is why you don't code tired) I copied the controller sense it was basically the same as another controller i had just made and forgot to change the value of $table which tells it what table to insert into. I din't check the query out put because it is built via a method and i had just used it and it worked. Next time i know to take all the steps even if i "know" it couldn't be the problem. Thanks Alexander.
Posted Image

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
Glad you could get it to work in the end. :)

Alexander.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users