NameSilo

Sql database

Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

redhippo

VIP Member
Impact
22
just a noob question

how do i insert data to a sql database?

what parameters are required? :laugh:
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
 
0
Close
hEEEEEEEEEEEEEEEEEElp

can you help out or anybody free to do so??:(
 
0
Close
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.
 
0
Close
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.
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back