| Index
» Projekty
» phpMyEdit
» Fórum
» Using one PHP file to edit multiple tables |
 |
thetime
Založený: 25.07.2009
Príspevky: 1
Zaslal: 2009-07-25 12:30
Návrat hore
Odpovedať s citátom
|
I was wondering if there was a better way to go about editing multiple tables using one script.
What I'm doing now is using a simple "index.php?table=another table" to change the table selected by the script.
Right now I'm using the suggestion found in this thread, http://opensource.platon.sk/forum/projects/viewtopic.php?t=372989 to be able to use the view, change, save, and apply buttons.
However, I run into "warning messages" when I update information. Warning messages appear when there is a space in the name of the selected table. The following warning message occurs with or without a space:
| Kód: |
| "Warning: Invalid argument supplied for foreach() in /var/www/myedit/phpMyEdit.class.php on line 2731" |
It doesn't seem to affect the editing of record information but I would like to try to clear up these warnings.
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2009-07-25 15:56
Návrat hore
Odpovedať s citátom
|
Spaces are probably illegal in MySQL naming conventions. Try renaming your table and see if the problem goes away. Generally best to name MySQL databases, tables, and columns using only lower case letters, the underscore character, and digits 0-9.
Hyphens are technically allowed but guaranteed to cause PHP to break a script if interpreted as a minus sign.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|