468,257 Members | 1,365 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

Inserting values in high quantity in database

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
6 1589
>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
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
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
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
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
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.

Similar topics

13 posts views Thread by Shannan Casteel via AccessMonster.com | last post: by
2 posts views Thread by altergothen | last post: by
1 post views Thread by tg.foobar | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.