Announcement

Collapse
No announcement yet.

Text field not accepting text

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Text field not accepting text

    I have a field (vsc) defined as VarChar 25 in mysqlI can insert alpha via mysql management (directly) so it doesn't seem to be a DB problem.
    I have no character restrictions in the field definitions.

    My app gives me an error when I try to insert it

    Anyone have any ideas why it will allow a string of numeric, but blows up with any alpha?

    I have tried setting it to VarChar and Text

    Error while accessing the database

    Unknown column 'wefwefwref' in 'field list' INSERT INTO tblPODetail (rangeid, cost, styleid, colorid, dimid, poid, buyerid, type, vendorid, vsc) VALUES (4 ,120.0000 ,9 , 1 , 1 , 367 , 3 ,'2',3 ,wefwefwref )


    Thanks

  • #2
    I also get this text

    Error while accessing the database
    Unknown column 'fcwwwewfwfe' in 'field list' where that string is the value I entered

    Its as if its looking for the VALUE of the field, in the field list

    Comment


    • #3
      Originally posted by lewis200 View Post
      I have a field (vsc) defined as VarChar 25 in mysqlI can insert alpha via mysql management (directly) so it doesn't seem to be a DB problem.

      Unknown column 'wefwefwref' in 'field list' INSERT INTO tblPODetail (rangeid, cost, styleid, colorid, dimid, poid, buyerid, type, vendorid, vsc) VALUES (4 ,120.0000 ,9 , 1 , 1 , 367 , 3 ,'2',3 ,wefwefwref )
      The wefwefwref string is missing the quotes.
      It should be:

      ,'wefwefwref' )

      Is that SQL statement generated by SC or by your code?


      Comment


      • #4
        Generated
        by SC

        Comment


        • #5
          maybe this?

          Comment


          • #6
            Or by direct insert
            INSERT INTO tblPODetail (rangeid, cost, styleid, colorid, dimid, poid, buyerid, type, vendorid, vsc) VALUES ('4' ,'120.0000' ,'9' , '1' ,'1' , '367' , '3' ,'2','3' ,"wefwefwref" )
            Or by php
            $val = "INSERT INTO tblPODetail (rangeid, cost, styleid, colorid, dimid, poid, buyerid, type, vendorid, vsc) VALUES ('4' ,'120.0000' ,'9' , '1' , '1' , '367' , '3' ,'2','3' ,'".$var_for_vsc."' )";
            sc_exec_sql($val);

            Comment

            Working...
            X