NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page sql database

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 11-07-2004, 09:46 PM THREAD STARTER               #1 (permalink)
NamePros Expert
 
redhippo's Avatar
Join Date: Oct 2003
Location: ANForum
Posts: 5,218
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, 10:32 PM   #2 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
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, 10:41 PM THREAD STARTER               #3 (permalink)
NamePros Expert
 
redhippo's Avatar
Join Date: Oct 2003
Location: ANForum
Posts: 5,218
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, 11:31 PM   #4 (permalink)
NamePros Regular
 
CreativeLogic's Avatar
Join Date: Sep 2003
Posts: 890
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:
????: NamePros.com http://www.namepros.com/programming/54727-sql-database.html

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, 07:43 AM   #5 (permalink)
NamePros Member
Join Date: Sep 2003
Posts: 171
delta4 will become famous soon enoughdelta4 will become famous soon enough
 



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.
__________________
Photoshop Tutorials Directory
delta4 is offline  
Closed Thread


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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 07:16 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger