I see the Editor says it will work with PostgreSQL (ad Adminer does), and I downloaded the first version (not the Editor for MySQL version). I've created an index.php per the example. But how do I tell it to use PostgreSQL?
Thanks
I see the Editor says it will work with PostgreSQL (ad Adminer does), and I downloaded the first version (not the Editor for MySQL version). I've created an index.php per the example. But how do I tell it to use PostgreSQL?
Thanks
Currently, using Adminer Editor with other database systems is little tricky. You have to define own loginForm method specifying the driver. Like this:
function loginForm() { ?> <table cellspacing="0"> <tr><th><?php echo lang('Username'); ?><td><input type="hidden" name="driver" value="pgsql"><input type="hidden" name="server" value="localhost"><input id="username" name="username" value="<?php echo h($_GET["username"]); ?>"> <tr><th><?php echo lang('Password'); ?><td><input type="password" name="password"> </table> <?php echo "<p><input type='submit' value='" . lang('Login') . "'>\n"; echo checkbox("permanent", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n"; }
You would probably also need to create the database method.
Hello. I tried different methods from different posts, but nothing is working. If you really target end users for Adminer Editor, it would be good to allow users to have an ability to open editor at least. Why the whole website doesn't have at least one Postgres example? Is it so rare database? I see many post here complaining pgsql bad support for editor, but any solution seems to be working.
I am not php programmer and I don't understand all that "you should implement loginForm". Where should I implement that? In new file? Within "<?php function adminer_object() {..."? Where to call that method?
"You also need to implement the database() method" — where should I implement that? How to implement that? So many questions because of lacking of one simple working example for Postgres. I very want to try Adminer Editor, but I'm stuck, I spent 2 hours trying to connect Editor to postgre without any luck. Adminer works perfectly, but editor not.
See https://www.adminer.org/en/extension/ for documentation.
Log in to post a comment.