Thanks very much for the previous help...
Basking in the SUN of my new found happiness, now that I have a non-
crashing and fully functional Firefox/phpMyAdmin DUO, after sadly
parting from a long friendship with Safari...
I created a table via the phpMyAdmin GUI (NOT using the SQL window),
with the following structure.
------------------------------------------------------
CREATE TABLE `mvc_project_01`.`telephones` (
`id` INT NOT NULL AUTO_INCREMENT,
`fk_users_id` INT NOT NULL …
[View More]COMMENT 'Users Foreign Key',
`location` VARCHAR(30) NOT NULL,
`country_code` VARCHAR(4) NOT NULL,
`area` VARCHAR(5) NOT NULL,
`number` VARCHAR(8) NOT NULL,
`created` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' on
update CURRENT_TIMESTAMP,
`modified_by` VARCHAR(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
------------------------------------------------------
after saving the table, I clicked on [Create PHP Code] button, and it
generated the correct php :
------------------------------------------------------
$sql = "CREATE TABLE `mvc_project_01`.`telephones` (`id` INT NOT NULL
AUTO_INCREMENT, `fk_users_id` INT NOT NULL COMMENT \'Users Foreign Key
\', `location` VARCHAR(30) NOT NULL, `country_code` VARCHAR(4) NOT
NULL, `area` VARCHAR(5) NOT NULL, `number` VARCHAR(8) NOT NULL,
`created` TIMESTAMP NOT NULL DEFAULT \'0000-00-00 00:00:00\',
`modified` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT
\'0000-00-00 00:00:00\', `modified_by` VARCHAR(30) NOT NULL, PRIMARY
KEY (`id`)) ENGINE = InnoDB;";
------------------------------------------------------
I copied the text to BBEdit,and replaced every ',', with ',\n', and
made a couple of other minor adjustments, which makes the php easier
to read :
------------------------------------------------------
$sql = "
CREATE TABLE `mvc_project_01`.`telephones` (
`id` INT NOT NULL AUTO_INCREMENT,
`fk_users_id` INT NOT NULL COMMENT \'Users Foreign Key\',
`location` VARCHAR(30) NOT NULL,
`country_code` VARCHAR(4) NOT NULL,
`area` VARCHAR(5) NOT NULL,
`number` VARCHAR(8) NOT NULL,
`created` TIMESTAMP NOT NULL DEFAULT \'0000-00-00 00:00:00\',
`modified` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT
\'0000-00-00 00:00:00\',
`modified_by` VARCHAR(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
";
------------------------------------------------------
I didn't know how to add the trigger via the phpMyAdmin GUI, so I
decided to use the SQL window.
I put the following Trigger Definition in the SQL window, after
creating the table :
------------------------------------------------------
DROP TRIGGER IF EXISTS `mvc_project_01`.`telephones_insert_trigger`;
DELIMITER ;;
CREATE TRIGGER `mvc_project_01`.`telephones_insert_trigger` BEFORE
INSERT ON `mvc_project_01`.`telephones`
FOR EACH ROW BEGIN
SET NEW.created = NOW();
SET NEW.modified = NOW();
END;
;;
DELIMITER ;
------------------------------------------------------
Everything went well, phpMyDamin was happy, but when I clicked on
[Create PHP Code] the result below was not what I had expected :
------------------------------------------------------
$sql = "# MySQL returned an empty result set (i.e. zero rows).\n"
. "\n"
. "DELIMITER ;\n"
. "";
------------------------------------------------------
Any Ideas what I might be doing wrong ?
Thank You Very Much...
Bill Hernandez
Plano, Texas
[View Less]
I am running on OS X 10.5.7 on an iMac 24 Intel machine, spend 10-14
hours a day programming, and hardly ever experience any kind of an
application hang, much less a crash.
Several days ago I downloaded and installed Zend Server CE, which came
with phpMyAdmin.
I have been using Navicat with mySQL and pgSQL for a long time, and
for the most part have experienced no problems.
Over the past few days I have tried to move away from Navicat, but
phpMyAdmin crashes almost every time I use …
[View More]it.
I have been reading in an sql file that creates some tables, triggers,
adds a few records. There's less than 10 records involved and 3 tables.
( 1 ) Select the database
( 2 ) Click on SQL icon
( 3 ) Click on "Import Files" link
( 4 ) Import the file containing the Structure and Data
( 5 ) Try to select a table to view the records
( 6 ) Everything appears fine, but as soon as I try to select a Table
to view the records, phpMyAdmin crashes.
I have also tried creating a table from scratch, adding a few records,
and exporting the Structure and Data to a file.
I will then drop the database, and create a new one.
At this point I will try steps ( 1 ) through ( 6 ) again with the same
results.
It doesn't matter whether I try to import the sql file exported from
Navicat, or the one exported from phpMyAdmin. It crashes regardless.
BTW, I have had to go back to Navicat, and it has yet to crash. It
does run rock solid, but has problems exporting out of mySQL and
importing into pgSQL, so it's not perfect either. I would love to be
able to use phpMyAdmin, and with any luck someone will have a clue.
One other thing, when I log into phpMyAdmin, it lets me in the door,
but as soon as I select a database, it immediately takes me back to
the Login Screen and makes me login again.
phpMyAdmin seems to work OK from what I've been able to tell with
existing databases, the problems appear when I try either pasting the
commands to create a table, or actually try to import a file
containing the Structure and Data.
Here are some observations that have nothing to do with the crashes,
but they are just beginners observations....
-- NAVICAT SQL Dump
-- version 3.2.0
-- http://www.navicat.com
--
-- Host: localhost
-- Generation Time: Jul 27, 2009 at 09:50 PM
-- Server version: 5.1.32
-- PHP Version: 5.2.10
-- --------------------------------------------------------
-- MY OBSERVATIONS WITH --> SQL Dump
-- --------------------------------------------------------
-- Differences between phpMyAdmin and Navicat
-- phpMyAdmin does the following :
-- --------------------------------------------------------
-- ( 1 ) phpMySQL : Uses // for delimiters in TRIGGERS instead of
using ;;
-- --------------------------------------------------------
-- ( 1 ) NAVICAT : DELIMITER ;;
-- ( 1 ) phpMySQL : DELIMITER //
-- --------------------------------------------------------
-- ( 2 ) phpMySQL : DOES NOT put a semi-colon after the END on the
triggers
-- --------------------------------------------------------
-- ( 2 ) NAVICAT :
-- ( 2 ) END;
-- ( 2 ) ;;
-- --------------------------------------------------------
-- ( 2 ) phpMySQL :
-- ( 2 ) END
-- ( 2 ) //
-- --------------------------------------------------------
-- ( 3 ) phpMySQL : DOES a lot of the keywords in lowercase, not all
-- --------------------------------------------------------
-- ( 4 ) phpMySQL : Puts all references to include the database for
example:
-- ( 4 ) CREATE TRIGGER
`mvc_project_01`.`projects_insert_trigger`BEFORE INSERT ON
`mvc_project_01`.`projects`
-- --------------------------------------------------------
-- ( 4 ) NAVICAT : DOES NOT reference the database for example:
-- ( 4 ) CREATE TRIGGER `projects_insert_trigger` BEFORE INSERT ON
`projects`
-- --------------------------------------------------------
-- ( 6 ) INSERT STATEMENTS
-- --------------------------------------------------------
-- ( 6 ) NAVICAT : On the INSERT statements Navicat does not list the
fields before the VALUES
-- ( 6 ) INSERT INTO `projects` VALUES('1','mvc_begin','Use Zend
Framework to work with a Model, View, Controller PHP
System','null','null','Bill Hernandez');
-- --------------------------------------------------------
-- ( 6 ) phpMySQL : Does NOT put single quotes around integers, has a
space after each COMMA
-- ( 6 ) INSERT INTO `projects` (`id`, `name`, `description`,
`created`, `modified`, `modified_by`) VALUES(1,'mvc_begin','Use Zend
Framework to work with a Model, View, Controller PHP
System','null','null','Bill Hernandez');
-- --------------------------------------------------------
Any Clues ?
Bill Hernandez
Plano, Texas
[View Less]
Hi
Dne Thu, 23 Jul 2009 19:33:42 +0000
drummingds1(a)users.sourceforge.net napsal(a):
> Revision: 12711
> http://phpmyadmin.svn.sourceforge.net/phpmyadmin/?rev=12711&view=rev
> Author: drummingds1
> Date: 2009-07-23 19:33:41 +0000 (Thu, 23 Jul 2009)
>
> Log Message:
> -----------
> Added Excel import module.
[...]
> + * LICENSE: This source file is subject to version 3.0 of the PHP license
> + * that is available through the world-wide-web at …
[View More]the following URI:
> + * http://www.php.net/license/3_0.txt. If you did not receive a copy of
> + * the PHP License and are unable to obtain it through the web, please
> + * send a note to license(a)php.net so we can mail you a copy immediately.
PHP license is AFAIK incompatible with GPL, so we can not include PHP
licensed code.
--
Michal Čihař | http://cihar.com | http://phpmyadmin.cz
[View Less]
Hi,
I uploaded a revision for patch
#2825187<https://sourceforge.net/tracker/index.php?func=detail&aid=2825187&group_id=…>at
sourceforge.net <http://zixan.info/?UlByGmx_>.
Notes:
- Please don't worry about changes in libraries/config.default.php other
than the addition of $cfg['Servers'][$i]['enable_userprefs'] = TRUE;. I
made other changes just for the sake of my local system.
- I tried to generalize lang strings by excluding settings' name from the
…
[View More]error message. Each setting name is set in server_perm_storage.php. I just
had a thought that it may cause a conflict with other languages if some
settings have different names. For example, 'foreign key maximum limit' may
be called 'límite máximo de claves foráneas' in Spanish. (Thanks to Google
translator, BTW.)
- Error handling is implemented in this revision. Users see a success
message if input meets the criteria, and an error message is displayed if
there is an error found.
- I see how I can use a loop to process settings, but I am wondering
since not all of the settings have same test criterion it may not be a
probable solution. What are your thoughts?
- In the future release, I will write a little blurb about each setting
somewhere in the interface. I believe it will better assist the users to
know what each setting is about. I thought it may be important as some of
these settings will be modified by some users for the first time.
- Also for future release: input box is highlighted if incorrect value is
entered, and previously entered value is also displayed instead of the one
in DB. Of course, implement control over other settings, and use
PMA_query_as_controluser()
for querying db.
Thanks!
--------------------------------------------------
Best regards,
Zeeshan Mughal
Email: zeeshanmughal(a)ieee.org
Web: http://www.zixan.info
[View Less]
Hi,
I have few things that I want to discuss.
I see some of the settings do not have their own user interface to edit them
such as “PropertiesIconic”. I might have to change plans about implementing
separate user interfaces for each settings, as they virtually do not exist
for some of them. I am beginning to feel like this project is not just about
having a feature to store settings permanently, but also providing users an
interface to change those settings that they were not able to do so …
[View More]before
because of not having access to config files on the server.
I see all of the settings (currently under consideration) also have
configuration options in ./libraries/config.default.php. Are these configs
only there for initial installation purpose? What would happen if sysadmins
change value for these options? Will these new settings override those
stored in DB?
Would it not be a decent idea to simply apply user settings to relative vars
in ./libraries/config.default.php by extracting them from db? May be also
have a mechanism to allow sysadmins to override DB stored settings?
I see there are several settings in ./libraries/config.default.php that can
easily be imported to permanent settings user interface. Is there a limit
on the number of settings that can have a place in the central admin
interface due to performance, or some other issues?
*Now, some coding questions:*
Following UPDATE query does not happen to perform any change to the table:
PMA_DBI_try_query("UPDATE pma_perm_usr_pref SET maxRows = 20 WHERE username
= root")
And following SELECT query actually gives me a rather weird result:
PMA_DBI_try_query("SELECT maxRows FROM pma_perm_usr_pref WHERE username =
root")
results in: *Resource Id #61
*Of course, changeable values are not hard-coded in the actual script. :)
Is there something wrong with the sql query?
For the later, I tried adding $link ( =
PMA_DBI_select_db($cfg['Servers'][1]['pmadb']) ) parameter just to test if
not having it was the problem. But, no luck.
Well, this brings me to my last question. For now, I am manually setting $i
equal to 1. Is there a way to extract this server parameter from some
automatically generated script?
Thank so much! Your help is much appreciated!
--------------------------------------------------
Best regards,
Zeeshan Mughal
Email: zeeshanmughal(a)ieee.org
Web: http://www.zixan.info
[View Less]
Hello,
I've been working on my design for managing slave replication and I've
run into a problem.
To explain, slave replication works in a way, that it loads master log
(located on master server), where information about transactions are
stored. Everything is fine, if you are setting up replication on empty
server. However, once you have some data on master, you have to copy
them to slave server before slave replication is started. My original
idea was to use LOAD DATA FROM MASTER, but …
[View More]this feature is no longer
supported
(http://dev.mysql.com/doc/refman/5.0/en/load-data-from-master.html). One
of my ideas is to create some sort of export/import function for copying
data from master to slave with phpMyAdmin. Another possibility (for
large databases/tables) is to ask root (=user) to do it manually (with
mysqldump+mysql client).
If anyone has any better idea how to solve this problem, please let me know.
Thank you.
Tomas
[View Less]
I am running on OS X 10.5.7 on an iMac 24 Intel machine, spend 10-14
hours a day programming, and hardly ever experience any kind of an
application hang, much less a crash.
Several days ago I downloaded Zend Server CE, which came with
phpMyAdmin. I have been using Navicat with mySQL and pgSQL for a long
time, and for the most part have no problems.
I have tried to move away from Navicat over the past few days, but
phpMyAdmin crashes almost every time I use it. I have been reading in …
[View More]
an sql file that creates some tables, triggers, adds a few records.
There's less than 10 records involved and 3 tables.
( 1 ) Select the database
( 2 ) Click on SQL icon
( 3 ) Click on "Import Files" link
( 4 ) Import the file containing the Structure and Data
( 5 ) Try to select a table to view the records
( 6 ) Everything appears fine, but as soon as I try to select a Table
to view the records, phpMyAdmin crashes.
I have also tried creating a table from scratch, adding a few records,
and exporting the Structure and Data to a file.
I will then drop the database, and create a new one.
At this point I will try steps ( 1 ) through ( 6 )
It doesn't matter whether I try to import the sql file exported from
Navicat, or the one exported from phpMyAdmin. It crashes regardless.
BTW, I have had to go back to Navicat, and it has yet to crash. It
does run rock solid, but has problems exporting out of mySQL and
importing into pgSQL, so it's not perfect either. I would love to be
able to use phpMyAdmin, hopefully somebody will have a clue.
One other thing, when I log into phpMyAdmin, and select a database, it
immediately goes back to the Login Screen and makes me login again.
phpMyAdmin seems to work OK from what I've been able to tell with
existing databases, the problems appear when I try either pasting the
creation commands for a table, or actually try to import a file
containing the Structure and Data
Here are some observations that have nothing to do with the crashes,
but they are just beginners observations....
-- NAVICAT SQL Dump
-- version 3.2.0
-- http://www.navicat.com
--
-- Host: localhost
-- Generation Time: Jul 27, 2009 at 09:50 PM
-- Server version: 5.1.32
-- PHP Version: 5.2.10
-- --------------------------------------------------------
-- MY OBSERVATIONS
-- --------------------------------------------------------
-- Differences between phpMyAdmin and Navicat
-- phpMyAdmin does the following :
-- --------------------------------------------------------
-- ( 1 ) phpMySQL : Uses // for delimiters in TRIGGERS instead of
using ;;
-- --------------------------------------------------------
-- ( 1 ) NAVICAT : DELIMITER ;;
-- ( 1 ) phpMySQL : DELIMITER //
-- --------------------------------------------------------
-- ( 2 ) phpMySQL : DOES NOT put a semi-colon after the END on the
triggers
-- --------------------------------------------------------
-- ( 2 ) NAVICAT :
-- ( 2 ) END;
-- ( 2 ) ;;
-- --------------------------------------------------------
-- ( 2 ) phpMySQL :
-- ( 2 ) END
-- ( 2 ) //
-- --------------------------------------------------------
-- ( 3 ) phpMySQL : DOES a lot of the keywords in lowercase, not all
-- --------------------------------------------------------
-- ( 4 ) phpMySQL : Puts all references to include the database for
example:
-- ( 4 ) CREATE TRIGGER
`mvc_project_01`.`projects_insert_trigger`BEFORE INSERT ON
`mvc_project_01`.`projects`
-- --------------------------------------------------------
-- ( 4 ) NAVICAT : DOES NOT reference the database for example:
-- ( 4 ) CREATE TRIGGER `projects_insert_trigger` BEFORE INSERT ON
`projects`
-- --------------------------------------------------------
-- ( 6 ) INSERT STATEMENTS
-- --------------------------------------------------------
-- ( 6 ) NAVICAT : On the INSERT statements Navicat does not list the
fields before the VALUES
-- ( 6 ) INSERT INTO `projects` VALUES('1','mvc_begin','Use Zend
Framework to work with a Model, View, Controller PHP
System','2009-07-27 20:48:54','2009-07-27 20:48:54','Bill Hernandez');
-- --------------------------------------------------------
-- ( 6 ) phpMySQL : Does NOT put single quotes around integers, has a
space after each COMMA
-- ( 6 ) INSERT INTO `projects` (`id`, `name`, `description`,
`created`, `modified`, `modified_by`) VALUES(1,'mvc_begin','Use Zend
Framework to work with a Model, View, Controller PHP
System','2009-07-27 20:48:54','2009-07-27 20:48:54','Bill Hernandez');
-- --------------------------------------------------------
Any Clues ?
Bill Hernandez
Plano, Texas
[View Less]
Hi all
as you might already have noticed, demo server, wiki and planet are
down. As well as my email and jabber. This is caused by hardware
failure and it's fixing is quite tricky right now because I'm in Spain
till 4th August, but I hope to be able to restore at least something
much sooner.
For now I've set up mail temporarily using Google apps, so at least it
should work, rest will hopefully come soon.
--
Michal Čihař | http://cihar.com | http://phpmyadmin.cz
I see PMA_query_as_controluser (in relation.lib.php; thank to Alex for the
help!) is written on the top of PMA_DBI_query and PMA_DBI_try_query
methods. PMA_DBI_query is written on the top of PMA_DBI_try_query. I was
wondering since PMA_DBI_try_query and PMA_DBI_fetch_result are part of a
same class then what different using PMA_query_as_controluser makes?
Also, I tried using it but I got Resource ID#63 error. I think SQL is fine
as it worked with PMA_DBI_fetch_result.
Thanks.
------------…
[View More]--------------------------------------
Best regards,
Zeeshan Mughal
Email: zeeshanmughal(a)ieee.org
Web: http://www.zixan.info
[View Less]