• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

Whats up with my query select statement?

Hi, I am trying to insert data into my table:  (for testing)

INSERT INTO earrings (name, content, filename, metal_id, material_id, featured, color, stock, price) VALUES ( name = 'dsfaf', content = 'adfasdf', filename = '', metal_id = '1', material_id = '28.15', featured = '1', color = 'adfadsf', stock = '1', price = '50.00')

It enters data, but its all 0s except that the filename is a 1 which doesnt make sense because I left it blank.  Anyone know whats going on?
0
FairyBusiness
Asked:
FairyBusiness
1 Solution
 
gyettonCommented:
looks like it is evaluating the equalities, try it without the identifiers.
'dsfaf', 'adfasdf', '', '1', '28.15', '1', 'adfadsf', '1', '50.00'
the numbers may not need the ' either.
0
 
FairyBusinessAuthor Commented:
Thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now