PHP Classes

Can't get the grid to update

Recommend this page to a friend!

      DrasticTools  >  All threads  >  Can't get the grid to update  >  (Un) Subscribe thread alerts  
Subject:Can't get the grid to update
Summary:Cannot get grid to update database
Messages:6
Author:Andy Lawton
Date:2007-03-26 15:53:47
Update:2007-03-27 09:12:57
 

  1. Can't get the grid to update   Reply   Report abuse  
Picture of Andy Lawton Andy Lawton - 2007-03-26 15:53:47
I have just downloaded the latest version of the grid, and it looks like it's just what I need. I can run all the examples, except I cannot get the grid to update the database from either the drop down list or from the enum field. I'm using PHP version 5.1.2 and MySQL 5.0.36. I can't really understand what is wrong, as I haven't written any code, just run the examples. I can change the database from another client logged in as the same user. Can you offer any help?!

  2. Re: Can't get the grid to update   Reply   Report abuse  
Picture of Andy Lawton Andy Lawton - 2007-03-26 16:06:44 - In reply to message 1 from Andy Lawton
Well, I found one problem - missing mootools.js! I downloaded the version from http://mootools.net/download with all the possible options. Now I can edit a field and the change is written to the database. However once I have edited something, I can't edit another field on the page until I have done a page refresh. The data will highlight when clicked, but it's not possible to edit it. The enum field does not drop dawn either. Is there anything else missing from the zip file?

  3. Re: Can't get the grid to update   Reply   Report abuse  
Picture of dd dd - 2007-03-26 18:07:23 - In reply to message 2 from Andy Lawton
Andy,

You are right, the mootools.js library is needed for MySQLPHpGrid, but it wasn't uploaded to phpclasses.
It's probably best to download the MySQLPHPGrid release from http://www.drasticdata.nl directly, now but also any later release of this class. The release provided there should include all necessary files.

regards,
Olav

  4. Re: Can't get the grid to update   Reply   Report abuse  
Picture of Andy Lawton Andy Lawton - 2007-03-26 20:59:49 - In reply to message 3 from dd
OK - I got the zip file from your website and it works a treat! Now, the inevitable questions ...
Number one:
Can you make one or more fields read only? I'd like to be able to display some fields, but only allow editing of a subset of them.

Number two:
I have used the Enum facility to provide a fixed choice for the one field I wish to allow to be modified, but it would be nice to be able to provide a list of possible entries for the field from another query. Is this possible?

Thanks for the grid regardless!

  5. Re: Can't get the grid to update   Reply   Report abuse  
Picture of dd dd - 2007-03-26 22:41:42 - In reply to message 4 from Andy Lawton
Well,
One: that will be possible in the next release. Planning: end of this week.
Two: Not possible at this moment, also not in the next release. I've had this question before, so it's on the wish list somewhere for later releases.

regards, Olav

  6. Re: Can't get the grid to update   Reply   Report abuse  
Picture of Andy Lawton Andy Lawton - 2007-03-27 09:12:57 - In reply to message 5 from dd
OK - looking forward to request 1 - I'll think of another way for request 2!

Andy