Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can someone please teach me the very basics of MYSQL Error?
#9
(01-04-2019, 03:44 AM)Ben Cousins Wrote: No.

So here's how that query works.

The syntax for an INSERT query is as follows:

INSERT INTO table_name.table_with_prefix (optional, collumn, names, if, being, selective) VALUES (as, per, set in, php)

Your query is:

INSERT INTO mybb_pollvotes (vid,uid,voteoption,dateline,pid) VALUES (0,2220,127,0,'')

Which basically means, insert the data into the mybb_pollvotes table, using the columns vid, uid, voteoption, dateline, pid. Now, you'd assume that the *id columns would have a number in them. That just makes sense; so when you try to insert '' into the pid column, it complains. Because it's not an integer (or a number - an integer, INT, is a number).

Which is why you're getting the error Incorrect integer value: '' for column 'pid' at row 1 - because you're not inserting an integer.

Thank you ben, so eye opening! I appreciate the insight, and will evaluate your solution until I fully grasp the solution you supplied.
Hey man, what's up?
Reply


Messages In This Thread
RE: Can someone please teach me the very basics of MYSQL Error? - by Michael2014 - 01-13-2019, 08:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)