Opening sql file with Notepad++

  • I was trying to locate some text in the web pages of my Joomla/VirtueMart website.

    Somebody advised me to “dump your database to sql file. Open it via Notepad++ and search your text”.

    I am able to dump the database to an sql file.

    I don’t quite understand what he meant by this. Is it possible to execute sql in notepad++? or where do I execute the sql statements and how does Notepad++ play a part in this. Do I execute sql in another tool and open the result in notepad++.

    Please somebody help!
    Thank you.

  • Not really related to Notepad++, you could use any text editor. The point of dumping the data to an SQL file is so you can do a freetext search on the entire database. After that you will have to use some imagination.

    The dump file itself is a series of statements. Say you want to find which page has title “very unique” in it. You open the SQL dump in Notepad++ and search for “very unique”. You see something like this (I’m just making this up, I have no idea how Joomla’s tables are structured):

    INSERT INTO page_title (id, title) VALUES (511, 'very unique page title');

    Now you have to use your knowledge of the underlying system (Joomla) to figure out how to edit the page with ID 511. Perhaps it’s possible to open a page by ID.

  • Thanks Jonandr for your prompt reply.

    I thought Notepad++ was a “source code editor”. Can it not do more than what you describe?

    Can I somehow load web pages in Notepad++ and do a search that way?

    Thanks again!

  • Not really sure what you mean. N++ is indeed a source code editor. Its main use is to display various kinds of text files. It has many features than just the simple search I described, but the search seemed to be the thing which was required here.

    You can load the source code for a web page into N++ and search. Just download the source code and open it in the program.

  • hi how can use it ?

Log in to reply