Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: DBD::mysql trouble

by Mr. Muskrat (Canon)
on Sep 23, 2009 at 15:24 UTC ( [id://796998]=note: print w/replies, xml ) Need Help??


in reply to DBD::mysql trouble

As the others have said, placeholders should be used.

Using placeholders won't fix your problem although it might make your problem more obvious.

Here is one of your sql statements:

INSERT INTO Repairs.computers VALUES (compManufacturer, compModel, com +pModelNum, OS, errorMsg, serviceNeeded, problemDescription, barcode, +password) ($customer_compman, $customer_compmodel, $customer_compMode +lNum, $customer_os, $customer_errormsg, $customer_service, $customer_ +probdesc, $customer_barcode, $customer_loginpw

Now we switch in the placeholders:

INSERT INTO Repairs.computers VALUES (compManufacturer, compModel, com +pModelNum, OS,errorMsg , serviceNeeded, problemDescription, barcode, +password) ( ?, ?, ?, ?, ?, ?, ?, ?, ?
What's this? The VALUES keyword is misplaced and there is a missing closing parenthesis? Oh my.

Replies are listed 'Best First'.
Re^2: DBD::mysql trouble
by vendion (Scribe) on Oct 06, 2009 at 18:47 UTC

    Thanks for all the help everyone it is now posting to the database and now I have to get it to pull data from the database, both single entry (Look up a certain computer/customer) and dump the whole database (see how many computers/customers are in the shop). That should be a matter of changing the MySQL query from a INSERT into a SELECT and so forth right?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://796998]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-18 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found