Jump to content

fiddlehead_cons

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

fiddlehead_cons's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the tip. I think I will do that from now on. Should I turn off magic quotes first or doesn't it matter? I also found out that one of my problems was with encoding. My GUI was being displayed in ISO-8859-1 and my database and database connection were UTF-8. The non-breaking space entity ( ) was causing a lot of problems. I tried changing the encoding of my GUI (Smarty templates embedded in a Joomla page) but it didn't seem to solve the problem. I also modified the form widget to only accept UTF-8 encondings. I eventually just did a str_replace() to get rid of all of the characters that were still causing me problems before writing to the database. Not elegant but more of an act of desperation. Not one of my prouder moments -James
  2. Ugh, I'll probably struggle with this until my last day. I always get stuck on this when I write an app. Maybe someone can help educate me here. I'm coding a PHP/MySQL based HTML GUI to SELECT a TEXT field from a table, edit it, and then UPDATE/INSERT it back into the table (data is passed via a POST). The TEXT data contains all sorts of special characters though. Semicolons and Dollar Signs are giving me the most trouble right now. Can anyone help me figure out why I continue to corrupt my TEXT data by doing multiple SELECTs and UPDATEs of the same data in succession? When do I need to addslashes(), stripslashes(), etc. etc? Also, how do I deal with special line returns ("\n\r") and other characters like semi-colons and dollar signs? Any help would be appreciated. Thanks -James P.S. My form is a Smarty template so I use {$smarty.post.textdata|stripslashes} to display in the form, if that matters.
  3. Phellow Phreaks! I'm trying to track the CPU usage of a short Linux script that I wrote called clientFeeder.do.  I want to grep out the system cpu time and log it into a file.  However, when I run the command: time . clientFeeder.do >> grep sys 2>&1 I get all three times, real, user, and sys. real    0m1.685s user    0m0.033s sys    0m0.027s Can anyone tell me what I'm doing wrong?  ???  I just want the sys time, not the other two lines.  Thanks! Warm regards, James
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.