Menu

Edit/Update Not Working

2003-02-02
2003-02-14
  • Neil Humphrey

    Neil Humphrey - 2003-02-02

    For some reason the Edit/Update function does not work for me. The confirmation page shows the information has changed, but when I list the table entries again they have not updated. I check in phpMyAdmin and they definately are not updating the tables. Anyone managed to get this part working ?
    I had to change a few other thing to get the Delete and Search functions working, so everything else is working for me now but the only thing I cant get working is the Edit/Update - Can anyone Help ?

     
    • al katraz

      al katraz - 2003-02-02

      there's a bug in the script i'm pretty sure

      I changed
      where id = '1";
      to
      where id = '$id'";

      and it worked for me afterwards.

      I appreciate the authors willingness to provide this open source script to everyone, but there are a few bugs in it and the documentation/help file is non-existant.   =)

       
      • Neil Humphrey

        Neil Humphrey - 2003-02-02

        Hi, thanks for the quick reply.
        I changed the value to '$id' and it still doesnt update my tables. Any other ideas ?
        Perhaps you could send me the 2 files so I can compare them to mine ? Any more help would be greatly appreciated. Thanks Again.

         
        • al katraz

          al katraz - 2003-02-02

          Check out my reply for your other quesiton.

          The other thing you could do would be to change it to

          where [unique field] = '$[unique field]'

          [unique field] of course needs to be changed to what ever you have that's unique for every row in your table. There are potential problems doing it this way tho and I would recommend the other way I suggested in your other question

           
    • Nilesh Dosooye

      Nilesh Dosooye - 2003-02-03

      I hope that you have got the edit/update to work. this version of codeGenie is only the first release. I have not spent much time with it, just 3 days.. so it does have some bugs and not very advanced. But as I find bugs from this forum and other means, I will try to fix them and add more features and definitely try to write some documentation :) everyone welcomed to submit documentation which i will then compile !

       
    • Pawel Szubert

      Pawel Szubert - 2003-02-04

      Hi,
      in the listermaker.php You assume, that the unique field in every record is 'id'. It is not always true. What do You think about adding in predatabaselister.php an opportunity to choose the unique field which could be used to link browse and formedit?
      I started coding that - hope will be finished today.

       
    • Anonymous

      Anonymous - 2003-02-13

      hi,

      i have

      where id = '$id'";

      but mine does not work. however when i add a line that says echo "$numberupdate" i get a "0" returned. i'm new to php/mysql but i'm pretty sure it's not correct.

      Any help will be much appreciated !

      Thanx,

       
      • al katraz

        al katraz - 2003-02-13

        Do you have a field in your database called "id" ?
        If not, it should be your first column, and you should make it the primary key

         
        • Anonymous

          Anonymous - 2003-02-14

          yea, in my database i have a "id" field (first field) set to auto_increment and to be the primary key.

           
    • Anonymous

      Anonymous - 2003-02-14

      i still think it's not using the value passed from the 'database lister'. when i look at my address bar at the top, it passes the id as .php?id=whatever

      $queryupdate = "select * from clientinfo where id = '$id'";

      when i check to see what is the value of this sting, i get

      select * from clientinfo where id = ''  <<<< when i echo "$queryupdate"

      looks to me like it's not getting the value from $id ??

      any comments / idea ?

       

Log in to post a comment.