Whats up with my query select statement?

Posted on 2011-05-01
Last Modified: 2012-05-11
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?
Question by:FairyBusiness
    LVL 4

    Accepted Solution

    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.

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now