Edit mutliple mysql tables with 1 php page

  • alex89
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Jul 18, 2008
  • Posts: 203
  • Loc: Western Australia
  • Status: Offline

Post July 22nd, 2008, 10:31 pm

I would like to have a list of table names (along the left hand side) and when the user clicks on them, the table will show (on the right). I'd like the right hand table to be editable in page (a table of inputboxes with a save submit button), and this to be possible without page refreshes.

Anyone know of any existing functions or scripts that do this? It seems stupid to write from scratch if it exists.
I'm not terribly experienced with javascript, so can anyone point me in the right direction?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 22nd, 2008, 10:31 pm

  • George L.
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Nov 05, 2007
  • Posts: 1842
  • Loc: sinister passage
  • Status: Online

Post July 23rd, 2008, 3:04 am

Hey man, have you tried looking at Joomla?
I do have a drug but it's not like pot or ecstasy it's love that's my drug and it will always be that way
(Thanks to boogs2007 & evenstar), this heart?
  • alex89
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Jul 18, 2008
  • Posts: 203
  • Loc: Western Australia
  • Status: Offline

Post July 23rd, 2008, 3:46 am

Whoops, I forgot to mention - I've got about 90% of the site complete, all built from scratch :) Uses php & MySQL.

I'd like a list of the tables in the database & inputboxes along right to modify existing database entries. The tables I want to modify only contain one row of data (a simple list of names).

Apart from a complete rework (into Joomla or similar), are there any simple php scripts/functions?
  • spork
  • HB
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 5483
  • Loc: Rochester, NY
  • Status: Offline

Post July 23rd, 2008, 7:36 am

Sounds like you're looking for something similar to phpMyAdmin, but with AJAX, yes?
How to Maintain Simple, Static Pages in a CakePHP Application
EEEEEEEEE! It's here!!
  • alex89
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Jul 18, 2008
  • Posts: 203
  • Loc: Western Australia
  • Status: Offline

Post July 23rd, 2008, 9:30 am

Exactly, thanks for putting it so eloquently :)
  • alex89
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Jul 18, 2008
  • Posts: 203
  • Loc: Western Australia
  • Status: Offline

Post July 24th, 2008, 8:39 am

So noone knows of a system? :(
  • George L.
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Nov 05, 2007
  • Posts: 1842
  • Loc: sinister passage
  • Status: Online

Post July 24th, 2008, 9:06 am

Would you like to make it editable for some chosen staff? as well?
I do have a drug but it's not like pot or ecstasy it's love that's my drug and it will always be that way
(Thanks to boogs2007 & evenstar), this heart?
  • alex89
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Jul 18, 2008
  • Posts: 203
  • Loc: Western Australia
  • Status: Offline

Post July 24th, 2008, 10:03 am

I can do that - I'd just like to know your thoughts on the best way to achieve the following:

Retrieve & edit multiple mysql database tables with php/javascript (without page refresh - if possible).
  • George L.
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Nov 05, 2007
  • Posts: 1842
  • Loc: sinister passage
  • Status: Online

Post July 24th, 2008, 10:19 am

ha.. that's the tricky one.
I do have a drug but it's not like pot or ecstasy it's love that's my drug and it will always be that way
(Thanks to boogs2007 & evenstar), this heart?
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7128
  • Loc: Ozzuland
  • Status: Offline

Post July 24th, 2008, 12:04 pm

You don't have much to worry about if you know which database to read for the information and how to handle all that.

If you got phpMyAdmin, you can read the information_schema database for specific information about databases and it's tables and apply Javascript to it. I doubt I have the time or ability to do this but if you know Javascript and PHP well enough, you could probably do something with this :lol:
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • alex89
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Jul 18, 2008
  • Posts: 203
  • Loc: Western Australia
  • Status: Offline

Post July 30th, 2008, 2:59 am

Alright, even with a page refresh - without having to make mutliple php pages for each table - any ideas?
  • spork
  • HB
  • Silver Member
  • User avatar
  • Joined: Sep 22, 2003
  • Posts: 5483
  • Loc: Rochester, NY
  • Status: Offline

Post July 30th, 2008, 8:02 am

I don't know of any web software that does that, although I can't imagine it would be too difficult to write yourself?
How to Maintain Simple, Static Pages in a CakePHP Application
EEEEEEEEE! It's here!!
  • SpooF
  • Ice Cream
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 2826
  • Loc: Richland, WA
  • Status: Offline

Post July 30th, 2008, 8:56 am

alex89 wrote:
Alright, even with a page refresh - without having to make mutliple php pages for each table - any ideas?


I want to try and see if we can get everything clarified here. You want the same abilities as phpMyAdmin? You can write your own version of it if you want. The basic underlying functionality of it uses a mysql keyword DESCRIBE.

http://dev.mysql.com/doc/refman/5.0/en/describe.html

I don't see any reason you would need more than one php file for multiple tables.
College Taught Me - And we're not talking about the classes!
@travisperson
  • alex89
  • Bronze Member
  • Bronze Member
  • User avatar
  • Joined: Jul 18, 2008
  • Posts: 203
  • Loc: Western Australia
  • Status: Offline

Post July 30th, 2008, 9:02 am

I'll explain a little more.

The page required will edit several mysql tables of data (used in other parts of the site), in a graphical table, which displays data, and if you double click/click the edit button, you can edit the data. You can also add new rows, delete rows & sort.

It just seems like a bit of a pain to recode this, I'm sure it does exist, but I haven't come across it. Anyone seen anything like this, or written it in the past?
  • SpooF
  • Ice Cream
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 2826
  • Loc: Richland, WA
  • Status: Offline

Post July 30th, 2008, 9:49 am

http://www.phpscaffold.com/

Its more than one page but you could easily combine them all.
College Taught Me - And we're not talking about the classes!
@travisperson
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 30th, 2008, 9:49 am

Post Information

  • Total Posts in this topic: 21 posts
  • Users browsing this forum: No registered users and 169 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.