error in query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kkshansid
    New Member
    • Oct 2008
    • 232

    #1

    error in query

    Code:
    $q="update student set name='".$_POST[a]."',batch='".$_POST[b]."' where studentid='".$_POST[studentid]."'";
     $r=mysql_query($q);
    this query doesnt update data is there any error in query
    my insert query is working properly
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    what does mysql_query() return?

    Comment

    • kkshansid
      New Member
      • Oct 2008
      • 232

      #3
      Originally posted by Dormilich
      what does mysql_query() return?
      it returns result of query

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Originally posted by kkshansid
        it returns result of query
        and the value of that is... true, false, anything else?

        Comment

        • kkshansid
          New Member
          • Oct 2008
          • 232

          #5
          Originally posted by Dormilich
          and the value of that is... true, false, anything else?
          ok its returning false

          Comment

          • Markus
            Recognized Expert Expert
            • Jun 2007
            • 6092

            #6
            See mysql_error().

            Comment

            Working...