cancel
Showing results for 
Search instead for 
Did you mean: 

MySQL multi Table access

bootfairs
Newbie
Posts: 3
Registered: ‎25-04-2008

MySQL multi Table access

I have created two tables using PHPmyAdmin the First I can access using PHP scripts.
The second Table I am unable to access using PHP scripts. To confirm this I have used the Print mysql_tablename ($db_Address, 0)
Which prints the name of the first Table
Print mysql_tablename ($db_Address, 1)
Does not prints the name of the Second Table and an error message is displayed.
Has any other user been able to access a second table created on the PHPmyAdmin site.
Note I can read the second table in PHPmyAdmin.

Also Is it just me who spends hours on the PHPmyAdmin site just to do one or two admin changes?
one of the slowest admin sites I have used  Cry
3 REPLIES 3
Peter_Vaughan
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: MySQL multi Table access


<?php
mysql_connect("localhost", "mysql_user", "mysql_password");
$result = mysql_list_tables("mydb");
$num_rows = mysql_num_rows($result);
for ($i = 0; $i < $num_rows; $i++) {
    echo "Table: ", mysql_tablename($result, $i), "\n";
}
mysql_free_result($result);
?>

What does the above give you?
Prod_Man
Grafter
Posts: 286
Registered: ‎04-08-2007

Re: MySQL multi Table access

Yes the PHPMyAdmin page has got much slower recently.
Although humbug has been down due to some faults,
so it maybe related to that? or that it's overloaded by so many handels, connections and so forth.
That's also why I've spent more time writing an Admin backed to my site,
so that I don't have to wait for PHPMyAdmin as much,
in fairness PHPMyAdmin is fairly heavy on some things even on a local webserver on the same machine.
I think just depends which server you use, but I'm glad it's not just me that is having this!
with reguards to the actual topic point, I'm not certain but,
I do know that Peter's code there will help.
I have had errors in the past using MySQL Functions,
on one handel twice, and it's not worked, so I had to re-query the server
(copy the line and put it after the first request function).
Hope something here helps to solve it! xD
Jim,
adagio
Grafter
Posts: 196
Registered: ‎03-04-2008

Re: MySQL multi Table access

bootfairs
Have you tried MySQL Administrator 1.2 running on your local machine? I have found that I can do most things that I need to and it is much faster than phpMyAdmin.
It can be downloaded from:
http://dev.mysql.com/downloads/gui-tools/5.0.html