scriptygoddess

Archive for the ‘Lessons learned’ Category

30 Apr, 2003

ASP 101

Posted by: Jennifer In: Lessons learned

I'm currently in training this week for ASP (and finally we're done with "review" – very long story). While little of this is useful for blogs, I still wanted to document what I'm learning. Here are my notes from class: (this is a VERY VERY long post.)

01 Apr, 2003

Making your PHP code portable

Posted by: Lynda In: Lessons learned

Recently my host, for whatever reason decided that it would be a better idea to NOT display errors if there was an error in the PHP code. Therefore if you had a parse error, instead of getting a helpful display that said such and gave you the line number, the page would just show a […]

14 Mar, 2003

Saving your PHP configure options

Posted by: dave In: Lessons learned

If you admin a (U*ix) PHP server and… If you recompile PHP periodically and… If you use a lot of add-ins with PHP do yourself a favor & save your "./configure…" command to a file with: echo ./configure -my options- > configure.sh You can then chmod the file as you see fit so no one […]

12 Feb, 2003

sprintf and mySQL's "LIKE"

Posted by: Jennifer In: Lessons learned

Chalk this up to "not one of my finer (smarter) moments". This is so silly, I probably shouldn't even admit to not realizing this – but I'm putting it here so I never forget it again. I had wanted to run a SELECT query where the conditional would be set with the "LIKE" – but […]

Comments Off on sprintf and mySQL's "LIKE"

09 Feb, 2003

Javascript Validation

Posted by: Jennifer In: Lessons learned

It is usually recommended to do some javascript validation on a form before it's sent. This way, you don't have to waste server resources doing this. (It's still recommended to do some server side validation as well – but hopefully you can cut out some of the mistakes with the client side/javascript validation).

(another non-blog post) Problem: Let's say you're displaying rows of data from your database, and there's just too many rows for one page. You'd like to show X number of rows of data per page, and then have "next"/"previous" buttons to navigate through the list. Let's also say you want to be able to sort […]

Ok… this is my first post here, so I'm going to start out relatively small. While I was working on the update of my flip gallery script today I needed a way to check a variable for a particular string, and if that string didn't appear I wanted to execute any php code that was […]

07 Feb, 2003

Alternate color rows when displaying data

Posted by: Jennifer In: Lessons learned

Again, another "not so interesting for blog stuff" type post. If you're displaying several rows of data and would like to alternate the background colors of the rows so they're easier to read: <? for ($i=0; $i<$someNumber; $i++) { ?> <tr <? if ($i%2) { ?> bgcolor="#CCCCCC" <? } ?>> <td>data</td> <td>more data</td> </tr> <? […]

07 Feb, 2003

mySQL data to CSV

Posted by: Jennifer In: Lessons learned

This isn't exactly useful for blog stuff – but if you're using mySQL for a business application, then downloading your data into a CSV file (CSV = Comma Seperated Values) is probably something that might come in handy. The key that I've found is that you can have any kind of characters inside each field, […]

07 Feb, 2003

File Uploads in forms

Posted by: Jennifer In: Lessons learned

Some notes again (mainly for myself) but maybe it'll help someone. Problem: Create a form that (after inserting data into a database) takes a file and uploads it to the server after renaming it with the timestamp, auto_incremented id, and a value from one of the fields from the mysql insert. (heh. Still with me?) […]


Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements