[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 11-07-2004, 08:46 PM   #1 (permalink)
NamePros Expert
 
redhippo's Avatar
 
Join Date: Oct 2003
Location: ANForum
Posts: 5,244
3,630.35 NP$ (Donate)

redhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to behold


sql database

just a noob question

how do i insert data to a sql database?

what parameters are required?
__________________
|www.vb-skins.com|- Quality Premade Vbulletin skins for Your VB forum makeover |www.Banjir.com|-Free image hosting?[B]For Sale!|AlphaScripts|Money Generating Scripts
FREE VB Skins
redhippo is offline  
Old 11-07-2004, 09:32 PM   #2 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute

Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
the easiest way to input data into a mysql database is too use phpmyadmin http://www.phpmyadmin.net/home_page/ (if you use cpanel it is already there for you in your cpanel just go to the mysql database area and at the botton there is a link)

If you are installing a package they ussually give you a .SQL file which is filled with sql queries that should be uploaded to the database (if they dont give you an installer that is) Alternatively they may provide you with the idnividual queries that can be input in the text box in the sql page of phpmyadmin
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 11-07-2004, 09:41 PM   #3 (permalink)
NamePros Expert
 
redhippo's Avatar
 
Join Date: Oct 2003
Location: ANForum
Posts: 5,244
3,630.35 NP$ (Donate)

redhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to behold


hEEEEEEEEEEEEEEEEEElp

can you help out or anybody free to do so??
__________________
|www.vb-skins.com|- Quality Premade Vbulletin skins for Your VB forum makeover |www.Banjir.com|-Free image hosting?[B]For Sale!|AlphaScripts|Money Generating Scripts
FREE VB Skins
redhippo is offline  
Old 11-07-2004, 10:31 PM   #4 (permalink)
NamePros Regular
 
CreativeLogic's Avatar
 
Join Date: Sep 2003
Posts: 894
138.00 NP$ (Donate)

CreativeLogic has a spectacular aura aboutCreativeLogic has a spectacular aura about


You should really do some reasearch. I will tell you how but you probably won't understand most of it. Here is a simple PHP query:

mysql_query("INSERT INTO table_name (column1, column2) VALUES($value1, $value2)");

That'll work most of the time. You may need to add slashes or sometimes it's better to do something like this:
mysql_query("INSERT INTO table_name (column1, column2) VALUES(" . $value1 . ", " . $value2 . ")");

And even more. It's best to put `` around column1 and column2 but not required. The reason for this is if you put spaces in the column names which is HIGHLY frowned upon. Also if you name a column a MySQL function. I've done this before and it's given me hours of headaches. Now its the first thing I check for.
__________________
Online Time Tracking :)
CreativeLogic is offline  
Old 11-08-2004, 06:43 AM   #5 (permalink)
NamePros Member
 
Join Date: Sep 2003
Posts: 162
90.00 NP$ (Donate)

lfrias is on a distinguished roadlfrias is on a distinguished road


have you tried phpMyAdmin?

if you want to insert thru php then you would do something like

mysql_query("insert into news set title='news title', author='news author' ");

you would insert a news title and a news author to a table called news and in which exist two fields: title and author.
lfrias is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 12:10 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85