I would not like using a button for all cases, it would take too much screen space when not needed.
We could check the browser in PMA_linkOrButton() to avoid generating a button when the browser does not have the length limitation.
Marc
Garvin Hicking a écrit:
Hi Olivier!
You could just put a primary key on your ID_msg field and the trouble would be gone. I think in the future Nijel wants to implement checkboxes for deleting multiple entries at once, so I guess he'll implement a different logic then anyways - I for one would dislike seeing those huge form buttons on every page instead of hovering links.
Maybe someone of the other developers wants to put a word on this...
Regards, Garvin.
<quote who="Olivier Brouckaert">
my query is
SELECT Sujet,Message FROM forum WHERE ID_msg > 1000
but if you use a button for GET and POST you juste have to do this way
<form method="<?php if($primary_key || $length<2048) echo 'GET'; else echo 'POST'; ?>" action="script.php"> <input type="hidden" name="where_condition" value="<?php if($primary_key) echo $primery_key; else echo $text; ?>"> <input type="submit" name="choice" value="Modify"> <input type="submit" name="choice" value="Delete"> </form>
and no javascript is used
----- Original Message ----- From: "Garvin Hicking" squirrel@supergarv.de To: phpmyadmin-devel@lists.sourceforge.net Cc: "Olivier Brouckaert" oli.brouckaert@i-services.be Sent: Saturday, May 03, 2003 11:27 AM Subject: Re: [Phpmyadmin-devel] Re: [Phpmyadmin-devel] bug : bouton et liens dans l'affichage des r ésultats d'une requete
Hi Olivier!
or to take less place, a link with an onclick attribute like this
<a href="#null" onclick="document.myform.submit()">Modify</a>
We can't use a button, because then we would have to use javascript to
submit it via
GET. And we don't want phpMyAdmin to be dependant on JavaScript.
On the other hand, if a button shows up in your table display, you're
doing
something wrong with your table layout anyways. Use primary keys where
possible, and
you won't have to deal with extra length GET methods...
But thanks for your consideration, Garvin.
----- Original Message ----- From: "Olivier Brouckaert" oli.brouckaert@i-services.be To: squirrel@supergarv.de Sent: Saturday, May 03, 2003 10:36 AM Subject: Re: [Phpmyadmin-devel] Re: [Phpmyadmin-devel] bug : bouton et
liens
dans l'affichage des r ésultats d'une requete
ok but why not place a button for GET method as well ? If more than
2048
chars, use POST method, otherwise GET method, and for the user that
would
be
transparent
----- Original Message ----- From: "Garvin Hicking" squirrel@supergarv.de To: "Olivier Brouckaert" oli.brouckaert@i-services.be Sent: Saturday, May 03, 2003 10:29 AM Subject: Re: [Phpmyadmin-devel] Re: [Phpmyadmin-devel] bug : bouton et
liens
dans l'affichage des r ésultats d'une requete
Hi Olivier!
Thanks for translating that - the reason is because the Internet
Explorer
doesn't
allow posting a form via a GET method when there are more than 2048
chars.
So we use
the POST field whenever a request is larger that 2048 chars, and then
we
have to use
buttons.
You could reduce that by placing primary keys on your table, so
phpMyAdmin
doesn't
have to take so many chars into regard when building a unique
condition
to
fetch
your data.
Regards, Garvin.
<quote who="Olivier Brouckaert">
>Hello > >when I show the result of a query "SELECT * FROM WHERE ..." in
phpMyAdmin,
>sometimes the link Modify / Delete is replaced by a button. > >Why this and will it be fixed in phpMyAdmin 2.5.0 final release ? > >This is a strange bug because if there is sometimes a button, that
means
>there must be a condition which, when it is true, shows a button,
otherwise
>a link. But why that test ? > >thanks > >Olivier > >----- Original Message ----- >From: "Garvin Hicking" squirrel@supergarv.de >To: "Olivier Brouckaert" oli.brouckaert@i-services.be >Sent: Saturday, May 03, 2003 9:58 AM >Subject: Re: [Phpmyadmin-devel] bug : bouton et liens dans
l'affichage
des
>résultats d'une requete > > > >>Hi Olivier! >> >>Are you able to write in english? If yes, please do so. I'm
curious
what
>you're > >>writing about :) >> >>Regards, >>Garvin. >> >><quote who="Olivier Brouckaert"> >> >>>Bonjour, >>> >>>lorsque j'affiche le contenu d'une requete SELECT dans
phpmyadmin,
>parfois je vois > >>>un lien Modifier / Supprimer parfois ce lien est remplacé par un
bouton.
>>>A quoi cela est-il du et est-ce que ce sera corrigé dans la
version
>2.5.0 ? > >>>En tout cas c'est un étrange bug :) car s'il y a un bouton qui
apparait
>parfois il > >>>doit y avoir un test sur une condition qui, quand elle est à
vrai,
>affiche un > >>>bouton, sinon un lien. Mais pourquoi ce test ? >>> >>>Cordialement, >>> >>>Olivier Brouckaert >>>webmaster@internetservices-fr.net >>> >> >> >>-- >>Bye, >>Garvin. >> >> > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Phpmyadmin-devel mailing list >Phpmyadmin-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel > > > > >
-- Bye, Garvin.
-- Bye, Garvin.