0

I know this is a very basic question. I am new to using phpMyAdmin. I created my database in Access and have now moved it across to phpMyAdmin. Normally, I would use queries in Access to edit my data. However, in phpMyAdmin, I cannot edit the data which results from my queries. There is a message which says "Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available." In addition to working out how to edit query results, is there a way of filtering query results, as you can in Access? Also, once the query results were filtered, how can I use a replace function similar to the action which can be performed in Access?

Also, if I wanted to reproduce the forms I was creating on Access, I assume this is not possible through phpMyAdmin. The webpages are being created in Wordpress. Is there a plug-in needed to set up something similar to Access forms?

Emma
  • 11
  • 3
  • perhaps missing an index in your table? Or not selecting the index? Show your query. – vitro Jun 03 '14 at 04:15
  • So normally you can edit queries in phpMyAdmin? – Emma Jun 03 '14 at 04:18
  • Queries or results of a query? Yes, you can edit both. – vitro Jun 03 '14 at 04:19
  • How? Just by editing the cell contents as you would in Access? – Emma Jun 03 '14 at 04:52
  • Yes, in new versions of phpmyadmin that is also possible. Create an index column. A couple of topics that may help: http://stackoverflow.com/questions/18227094/new-version-of-phpmyadmin-has-stopped-me-being-able-to-edit-data http://stackoverflow.com/questions/21581543/table-with-no-unique-column-in-phpmyadmin – vitro Jun 03 '14 at 06:24
  • With reference to the first link, the query is from multiple tables and all the tables already have a primary key (integers, auto-increment) – Emma Jun 03 '14 at 06:34
  • without seeing the query and table structure it is difficult to answer – vitro Jun 03 '14 at 07:46
  • I added loads of indexes and I was able to do 'filter row', but not edit the query results, but now I can't even do 'filter row' without it throwing up an error message. – Emma Jun 04 '14 at 04:25
  • Sorry, cannot be of any help without knowing the structure of your tables, search google for 'phpmyadmin tutorial' – vitro Jun 04 '14 at 08:49
  • SELECT LN.LN,WC.WC, WE.Entry, TIN.TWNID, TWN.TWNID,TWN.TWN,WE.MightNeedToChangeTo,WE.FilterX FROM WE INNER JOIN WC ON WE.WCID = WC.WCID INNER JOIN LN ON WE.LNID = LN.LNID INNER JOIN TIN ON WE.TINID = TIN.TINID INNER JOIN TWN ON TIN.TWNID = TWN.TWNID WHERE WE.FilterX IS NOT NULL – Emma Jun 04 '14 at 11:13
  • phew... this makes no sense to me and what I would do is rename tables and columns to something meaningfull and study the select and what you want to achieve. Also Explain may help: https://dev.mysql.com/doc/refman/5.0/en/explain.html – vitro Jun 04 '14 at 13:39
  • Apparently, phpMyAdmin is just alerting us to the fact that there is no way to uniquely identify the rows within this set of results and have found out that we can just add a Unique ID column to this in order to fulfil this need…? If this is the solution, to which table do we add this column and from where? Is this possible in queries featuring numerous Inner Joins? Does this need to be done using the CREATE TABLE statement? Do we need to add a column for each new query that we run where we wish to edit the results? If so, what happens to this once our editing is completed? – Emma Jun 04 '14 at 22:50
  • try `select * from WE`, you should be able to edit.. I am not sure if phpmyadmin will allow you to edit data for such a complicated join, you should be able to edit each and every single table there – vitro Jun 05 '14 at 12:50
  • here you have some study material for joins: http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/ – vitro Jun 05 '14 at 12:54
  • It is a normalised relational database, so editing one table at a time will not allow us to edit the data in any meaningful way, as I was able to do in Access. – Emma Jun 05 '14 at 17:37
  • The inner joins are correct and the query produces exactly the desired results, but they cannot be edited. – Emma Jun 05 '14 at 17:50
  • Try to use different tool if you can, Mysql workbench or Toad comes to my mind – vitro Jun 05 '14 at 17:57

0 Answers0