81044

Running a mysql query from phpmyadmin only changed 1 record. Tried ssh but same issue

Question:

I am trying to run a query to combine fields from one table to another table in the same mysql database.

I tried to execute in phpmyadmin and only changes 1 record (but does it correctly)

After research i found that it should not be done in phpmyadmin. So the only other way i know how was in ssh. Im running putty on my windows 8 pc and i can login to my server then i can log into mysql database. When running the query it still only changes on row.

So then i started looking at php's but not sure that's what i need to do. I would assume i could just run this query to go through entire table but maybe im missing something.

Here is the query im running.

INSERT INTO appfilter2 SELECT userapps.name, GROUP_CONCAT(CONCAT(userapps.activity, '/',userapps.class)) AS activity FROM userapps

How can i simply run this query to fill my appfilter2 table with all concatenated entries from userapps?

Answer1:

Your SELECT query is missing a GROUP BY clause. Probably you mean:

INSERT INTO appfilter2 SELECT userapps.name, GROUP_CONCAT(CONCAT(userapps.activity, '/',userapps.class)) AS activity FROM userapps GROUP BY userapps.name

Recommend

  • CUDA Visual profiler over a remote X session
  • Remote access Jupyter notebook from Windows?
  • Use SSHTool to convert Putty Private Key to OpenSSH private key
  • svn ci multiline message log/text file with log message
  • calling a VB.net function from javascript
  • How to make local USB port to work with Azure virtual machine
  • InputDispatcher Error
  • Background image does not show on iPhone/iPad
  • SEO friendly 301 redirect .htm to .aspx
  • Odd function behaviour with Tkinter
  • `docker cp` doesn't copy file into container
  • How to check disabled jobs with Jenkins server?
  • Python Paramiko send CTRL+C to an ssh shell
  • Create Instant using a negative year
  • converting text file into xml using php?
  • Check for zero lines output from command over SSH
  • How to run “Deployd” on port 80 instead of port 5000 in webserver.
  • Android full screen on only one activity?
  • Why is an OPTIONS request sent to the server?
  • Is there any way to access browser form field suggestions from JavaScript?
  • Resize panoramic image to fixed size
  • Sony Xperia Z Tablet not found by adb
  • Volusion's generic SQL folder, functionality
  • Javascript convert timezone issue
  • Can a Chrome extension content script make an jQuery AJAX request for an html file that is itself a
  • ActionScript 2 vs ActionScript 3 performance
  • Why is the timeout on a windows udp receive socket always 500ms longer than set by SO_RCVTIMEO?
  • Upload files with Ajax and Jquery
  • Weird JavaScript statement, what does it mean?
  • How can I estimate amount of memory left with calling System.gc()?
  • Apache 2.4 - remove | delete | uninstall
  • Unanticipated behavior
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • AngularJs get employee from factory
  • Proper way to use connect-multiparty with express.js?
  • How do you join a server to an Active Directory (domain)?
  • coudnt use logback because of log4j
  • Memory offsets in inline assembly
  • Can't mass-assign protected attributes when import data from csv file
  • Unable to use reactive element in my shiny app