| Index
» Projekty
» phpMyEdit
» Fórum
» trim() |
 |
hbernard
Založený: 23.03.2003
Príspevky: 159
Bydlisko: FRANCE
Zaslal: 2004-01-21 22:23
Návrat hore
Odpovedať s citátom
|
| Doug Hockinson Napísal: |
| It appears that function get_cgi_vars() doesn't return a trimmed value. If the user adds a new record and a space is the first character typed, then the space is not removed from the entry when committed to the database. I am using a recent CVS version of phpMyEdit.class.php. |
Well, isn't this a correct behavior ?
I mean, if you want to allways trim, you can use
'sqlw' => 'trim($val_qas),
can't you ?
|
nepto
Založený: 06.01.2003
Príspevky: 320
Bydlisko: Phoenix, Arizona (USA)
Zaslal: 2004-01-23 16:46
Návrat hore
Odpovedať s citátom
|
I would recommend not to edit 100+ records, but run quite simple UPDATE on your table.
_________________ Ondrej Jombik (Nepto)
Visit my
homepage
, review my recent
CV
or
projects
and give me some
feedback
.
|
hbernard
Založený: 23.03.2003
Príspevky: 159
Bydlisko: FRANCE
Zaslal: 2004-01-23 21:58
Návrat hore
Odpovedať s citátom
|
| Doug Hockinson Napísal: |
When I change in get_cgi_vars()
to
then sorting by clicking a column title does not work. Try it. This is unexpected, so I thought I'd mention it. |
I think this is because $var may be an array (?)
|
hbernard
Založený: 23.03.2003
Príspevky: 159
Bydlisko: FRANCE
Zaslal: 2004-01-24 11:58
Návrat hore
Odpovedať s citátom
|
Well, this works for me:
replace :
by :
| Kód: |
if (!is_array($var)) {
return trim($var);
} else {
return $var;
} |
in the get_cgi_var() func
I would recommend you to make a tiny class extension that will have only get_cgi_var() changed this way.
So you will not loose further enhancement.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|