Tagged: mysql Toggle Comment Threads | Keyboard Shortcuts

  • Peter Mahoney 3:00 pm on February 13, 2013
    Tags: #fridayfreebie, , files, , header, html5, mysql, , template, top.php, website template   

    Website code template 

    This is for my fellow developers out there.

    I have a small series of files I copy and paste whenever I’m about to start a new project, they have default templates for various files I use a lot. Like a header, footer, index page, blank stylesheet, and something called “top.php” that I use to open sessions and connect to databases.

    There are also some of my standard folders pre-made too (with the correct server permissions) like “img” (images) and “upl” (uploads).

    This was going to be last week’s #fridayfreebie, but here it is on a Wednesday instead.

    This particular version is the one I use most commonly, and it’s set up for:

    • PHP
    • MySQL
    • HTML5
    • CSS (any version!)
    • and ideally a unix/linux based server, because it references the top level of the site as being “/”.

    I’ve zipped it up to share! Feel free to do whatever you want with it—although there is a lot of Peter Mahoney specific stuff in there, so you might want to take that out. Unless of course you like giving me credit for your work. 🙂

    HTML5 website template (.zip)

    Permalink | Reply
  • Peter Mahoney 10:17 am on September 19, 2012
    Tags: database, mysql, , sql   

    Easily search and replace throughout a (smallish) MySQL database 

    Every now and then I need to search through an entire MySQL database, to change a word, term, URL, or some other string.

    Rather than searching through the entire database to make the change, I just use phpMyAdmin to export the whole thing as an .sql file, which is of course just plain text.

    Open it in a text editor, find and replace in there, then re-upload to phpMyAdmin.

    In short, I get it done easily in a bout 45 seconds without having to worry about a typo in an SQL query destroying my data.

    Permalink | Reply
compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc