By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,674 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

Inserting values in high quantity in database

P: n/a
I want to insert values in the database.If i insert values one by one
then it works till 4 or 5 fields then after it gives error.In my
database there are more than 20 field.Pls help me.
Aug 23 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
>I want to insert values in the database.If i insert values one by one
>then it works till 4 or 5 fields then after it gives error.In my
database there are more than 20 field.Pls help me.
mysql_query() only takes 2 arguments, not 3.141592 arguments, in
line 42.

If you think this answer does not address the problem, how about
including some code, the query, or the error message you got (or
preferably all three)? And what database are you using?

Aug 23 '08 #2

P: n/a
On Aug 23, 6:34*am, Bunty <bunty.virad...@gmail.comwrote:
I *want to insert values in the database.If i insert values one by one
then it works till 4 or 5 fields then after it gives error.In my
database there are more than 20 field.Pls help me.
You obvious have some type of insert error. It would help if you gave
us the error message.

Check the database field type you are inserting into and the data you
are inserting.

Check you have properly encoded the data you are inserting.

Check the databases error message using the appropriate error info
function (e.g. mysql_error() or PDOStatement::errorInfo() for MySQL)
Aug 23 '08 #3

P: n/a
On Aug 23, 9:13*pm, macca <ptmcna...@googlemail.comwrote:
On Aug 23, 6:34*am, Bunty <bunty.virad...@gmail.comwrote:
I *want to insert values in the database.If i insert values one by one
then it works till 4 or 5 fields then after it gives error.In my
database there are more than 20 field.Pls help me.

You obvious have some type of insert error. It would help if you gave
us the error message.

Check the database field type you are inserting into and the data you
are inserting.

Check you have properly encoded the data you are inserting.

Check the databases error message using the appropriate error info
function (e.g. mysql_error() or PDOStatement::errorInfo() for MySQL)
I am using MYSQL database and it's give error that NO database selected
Aug 23 '08 #4

P: n/a
On Aug 23, 11:13*am, gordonb.ss...@burditt.org (Gordon Burditt) wrote:
I *want to insert values in the database.If i insert values one by one
then it works till 4 or 5 fields then after it gives error.In my
database there are more than 20 field.Pls help me.

mysql_query() only takes 2 arguments, not 3.141592 arguments, in
line 42.

If you think this answer does not address the problem, how about
including some code, the query, or the error message you got (or
preferably all three)? *And what database are you using?
I am using mysql
Aug 23 '08 #5

P: n/a
On Aug 23, 11:43*am, Bunty <bunty.virad...@gmail.comwrote:
On Aug 23, 9:13*pm, macca <ptmcna...@googlemail.comwrote:
On Aug 23, 6:34*am, Bunty <bunty.virad...@gmail.comwrote:
I *want to insert values in the database.If i insert values one by one
then it works till 4 or 5 fields then after it gives error.In my
database there are more than 20 field.Pls help me.
You obvious have some type of insert error. It would help if you gave
us the error message.
Check the database field type you are inserting into and the data you
are inserting.
Check you have properly encoded the data you are inserting.
Check the databases error message using the appropriate error info
function (e.g. mysql_error() or PDOStatement::errorInfo() for MySQL)

I am using MYSQL database and it's give error that NO database selected
That error should be your first clue.

It takes two functions to connection to MySQL mysql_connect()
mysql_select_db().

So far, this error doesn't have anything to do with your SQL.

http://www.php.net/manual/en/book.mysql.php
Aug 23 '08 #6

P: n/a
king(dot)isaac(at)gmail(dot)com wrote:
On Aug 23, 11:43 am, Bunty <bunty.virad...@gmail.comwrote:
>On Aug 23, 9:13 pm, macca <ptmcna...@googlemail.comwrote:
>>On Aug 23, 6:34 am, Bunty <bunty.virad...@gmail.comwrote:
I want to insert values in the database.If i insert values one by one
then it works till 4 or 5 fields then after it gives error.In my
database there are more than 20 field.Pls help me.
You obvious have some type of insert error. It would help if you gave
us the error message.
Check the database field type you are inserting into and the data you
are inserting.
Check you have properly encoded the data you are inserting.
Check the databases error message using the appropriate error info
function (e.g. mysql_error() or PDOStatement::errorInfo() for MySQL)
I am using MYSQL database and it's give error that NO database selected

That error should be your first clue.

It takes two functions to connection to MySQL mysql_connect()
mysql_select_db().

So far, this error doesn't have anything to do with your SQL.

http://www.php.net/manual/en/book.mysql.php
Also maybe if you posted your actual code may help.
Aug 23 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.