Inserting values in high quantity in database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bunty

    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.
  • Gordon Burditt

    #2
    Re: 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.
    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?

    Comment

    • macca

      #3
      Re: Inserting values in high quantity in database

      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::e rrorInfo() for MySQL)

      Comment

      • Bunty

        #4
        Re: Inserting values in high quantity in database

        On Aug 23, 9:13 pm, macca <ptmcna...@goog lemail.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::e rrorInfo() for MySQL)
        I am using MYSQL database and it's give error that NO database selected

        Comment

        • Bunty

          #5
          Re: Inserting values in high quantity in database

          On Aug 23, 11:13 am, gordonb.ss...@b urditt.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

          Comment

          • king(dot)isaac(at)gmail(dot)com

            #6
            Re: Inserting values in high quantity in database

            On Aug 23, 11:43 am, Bunty <bunty.virad... @gmail.comwrote :
            On Aug 23, 9:13 pm, macca <ptmcna...@goog lemail.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::e rrorInfo() 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.


            Comment

            • FutureShock

              #7
              Re: Inserting values in high quantity in database

              king(dot)isaac( at)gmail(dot)co m wrote:
              On Aug 23, 11:43 am, Bunty <bunty.virad... @gmail.comwrote :
              >On Aug 23, 9:13 pm, macca <ptmcna...@goog lemail.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::e rrorInfo() 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.

              Comment

              Working...