Jump to content

SharkBait

Members
  • Posts

    845
  • Joined

  • Last visited

    Never

Everything posted by SharkBait

  1. Anytime something shows up with [http://afdasdfsaf] I guess anytime a URL shows up within square braces, i want to remove the square braces and the contents within them I just want the the [http://afdasdfsaf] removed. Sorta like BBCode, but it isnt
  2. So how do I go about using preg_replace() to remove a portion of a string and ignoring the rest of it? String: [http://this.is.my.site.com/stuff/funn] this is cool! so that it only returns this is cool! I can't seem to get the regex pattern right
  3. Awesome.. thanks!
  4. Can't seem to quite figure out what query I need to do what I want. SELECT IFNULL(id, 0) as id1 FROM photo WHERE id < 3 LIMIT 1 UNION SELECT IFNULL(id, 0) as id2 FROM photo WHERE id > 3 LIMIT 1 Essentially I want to return 2 columns, the first one being from the top query and the second one for hte bottom query. But then a union isn't what i want is it? Then i tried to do a join SELECT t1.id as id1, It2.id as id2 FROM photo as t1 JOIN photo as t2 WHERE t1.id > 2 AND t2.id < 2 But that didn't work either.. What is it I am looking for? Trying to return the the row before and after a particular entry with 1 query as opposed to 2.
  5. The php portion.. doesn't do anything with $custid your first query just pulls ALL the data You need to iterate through the array that $row will be to get it to display anything.
×
×
  • 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.