/    Sign up×
Community /Pin to ProfileBookmark

Miffed with PHPMyAdmin, writing replacement

I’ve had problems with PHPMyAdmin on my website’s server, so I figured I’d set out on a rather ambitious project: write my own database manager.

So, first question: how can I use PHP to get a list of table names and column names from MySQL?

to post a comment
PHP

9 Comments(s)

Copy linkTweet thisAlerts:
@Mr_Initial_ManauthorNov 25.2007 — Okay, more help with form needed...

here's the code for one of the pages:
[code=html]<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-/W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="application/javascript" />
<link type="text/css" rel="stylesheet" href="" />
<title>MySQL Manager Index</title>
</head>

<body>
<h1>MySQL Manager</h1>
<h2>Viewing Tables in Database "coachrandom"</h2>
<form action="view_table.php" method="get">
<fieldset>
<legend>Choose Table</legend>
<div>

<select name="database=coachrandom&amp;table">

<option value="characters">characters</option>
<option value="comchars">comchars</option>
<option value="comics">comics</option>
<option value="keywords">keywords</option>
<option value="storylines">storylines</option>

<option value="subjects">subjects</option>
</select>
<input type="submit" value="Open Table" />
</div>
</fieldset>
</form>
<script type="application/javascript" src="" />
</body>

</html>[/code]


Here's where I'm having trouble: [b]<select name="database=coachrandom&amp;table">[/b]

I want the final result to be something like [i][u]url.php?database=my_database&table=my_table[/u][/i]
Copy linkTweet thisAlerts:
@Mr_Initial_ManauthorNov 25.2007 — EDIT: I got it to work through a hidden control.
Copy linkTweet thisAlerts:
@chazzyNov 25.2007 — ah... but my wheel has two times more rolling power!
Copy linkTweet thisAlerts:
@Mr_Initial_ManauthorNov 25.2007 — Say what?
Copy linkTweet thisAlerts:
@afigueroaNov 25.2007 — ah... but my wheel has two times more rolling power![/QUOTE]

goodyear ?
Copy linkTweet thisAlerts:
@Mr_Initial_ManauthorNov 26.2007 — How'd we get onto the topic of wheels?
Copy linkTweet thisAlerts:
@NogDogNov 26.2007 — Perhaps Chazzy was referring to the phrase "reinventing the wheel" with reference to recreating your own version of phpMyAdmin? (Just speculation on my part...I don't want to put words in his mouth...errr...keyboard.)
Copy linkTweet thisAlerts:
@Mr_Initial_ManauthorNov 26.2007 — Well, I figured out what was going on with PHPmyAdmin, but it's still a good exercise!
×

Success!

Help @Mr_Initial_Man spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...