Webmaster Forum Rules | Posting Guide | Contact Us | Testimonials | Contributing Geek Program | Advertise on Geek/Talk
Welcome to the GeekTalk Webmaster Discussion Forums from GeekVillage.com

Click Here To Register. It's Free!

Go Back   geek/talk: Signature-free discourse for serious web publishers > YOUR CREATION: Building & Maintaining A Web Site > Web Development - Programming / Coding
User Name
Password
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 01-30-2005, 01:07 PM   #1
gene02
Registered User
 
Join Date: Sep 2003
Location: Georgia
Posts: 4
Default mysql help

here is my code that doesn't work and I don't know why I'm sorta new at this.
<cfquery name="dpost" datasource="tankerloads">
INSERT INTO `Customers`
(`customer_ID`, `customer_name`, `customer_address`, `customer_city`, `customer_state`, `contact_number`, `contact_email`)
</cfquery>
<cfquery name="dpost" datasource="tankerloads">
INSERT INTO `destination`
(`dest_city` ,
`dest_state` ,
`del_date` ,
`customer_city`)
</cfquery>
gene02 is offline   Reply With Quote
Old 01-30-2005, 04:28 PM   #2
kylebuttress
Registered User
 
kylebuttress's Avatar
 
Join Date: Jan 2005
Location: Gold Coast - Australia
Posts: 27
Default basic answer

Hi,

Not real sure what scripting language you are programming in.

But the basic format for MySQL inserts is similar to the following

INSERT INTO `sometable` (`field_1`, `field_2`, `field_3`) VALUES ('val_1', 'val_2', 'val_3')

this format should work providing you have established a connection to the mysql database.

Hope this helps

regards

Kyle
kylebuttress is offline   Reply With Quote
Old 01-30-2005, 04:35 PM   #3
alpha5th
Registered User
 
Join Date: Apr 2004
Location: Denmark
Posts: 6
Default

I don't know much about ColdFusion, but maybe this will help?

http://livedocs.macromedia.com/coldf...nce/Tags78.htm
alpha5th is offline   Reply With Quote
Old 01-30-2005, 10:09 PM   #4
Sashman
Registered User
 
Join Date: Aug 2002
Location: Dulles Virginia
Posts: 590
Default Re: mysql help

The SQL inside the query tags are independent of the scripting language (cold fusion). Either read about mysql SQL or use cold fusion's CFINSERT or CFUPDATE functions. I particularily do not like using them, however they allow you to create code that works on pretty much any DB and don't really require an understanding of SQL.

Last edited by Sashman; 01-30-2005 at 10:10 PM.
Sashman is offline   Reply With Quote
Old 02-20-2005, 11:42 PM   #5
Nikolas
Registered User
 
Join Date: Feb 2005
Location: Greece
Posts: 62
Default

You can also do that :
Quote:
INSERT INTO `sometable` VALUES ('val_1', 'val_2', 'val_3')
Nikolas is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL installation problems. b2gdotcom Web Development - Programming / Coding 3 11-29-2001 03:00 AM
Uploading database (MySQL), and User Comments masm50 Web Development - Programming / Coding 2 10-22-2001 03:45 AM
Tip for heavy MySQL users: CREATE INDEX demae Web Hosting Discussion 4 05-15-2001 04:32 PM
vBullletin - Corrupted MySQL records! Steve_S Web Design and Webmaster Issues 5 02-06-2001 11:44 PM
mysql overload? notibrian Web Design and Webmaster Issues 0 02-01-2001 08:03 PM

Please support our advertisers. They ensure our survival.

All times are GMT -5. The time now is 09:24 AM.


GeekVillage.com is copyright © 1998-2014 iOnline Web Design. All rights reserved.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.