Jump to content

jt

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jt's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Nevermind, I was passing the string through a deprecated custom function that was using the function mysql_real_escape_string() before it was being inserted. Removing this and using a stripslashes() on the string before insert works the way I intend.
  2. Hard to say without some specific examples. Can you maybe show what you do now, or show the layout of 3-4 of the content tables and what you are needing to do with them?
  3. what is the output of the print_r
  4. do a print_r($ferries); after you call the getAll() function and make sure an array is being returned Edit: DarkWater beat me to it...
  5. I prefer $oneTwoThree (lowercase first word, uppercase first letter of every following word)
  6. I have a form that includes a text area. When I insert the value of the text area into MS SQL, it places \r\n etc wherever the user wanted a new line or paragraph. So for example, in the form, my text looks like this: test testtest test in the column in SQL Server, my inserted value looks like: test\r\n\r\ntesttest\r\n\r\ntest etc I need this to insert into SQL server, without those values (basically, I just want to insert exactly as it looks on the textfield when the user fills it in). In MySQL, I have no problem with this since it seems to insert normally (although I think PHPMyAdmin might format those fields with nl2br() automatically, not sure about that). Then, when I display these from a SELECT on my site, I need to be able to use the nl2br() function normally so that the text gets formatted for display. I tried using a couple different forms of preg_replace(), but can't seem to get that right, not does str_replace() seem to do what I want. I've searched and searched for something on this, and can't seem to get what I'm looking for. Any thoughts would be much appreciated.
×
×
  • 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.