SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    preg_match returns false all the time?

    I have a test on a DB query that looks like this:

    Code:
    switch(preg_match("/INSERT|UPDATE|DELETE|COUNT/", $query))
    {
      case 1:
        do something;
        break;
    
      case 0:
        do something else;
        break;
    }
    I have ran queries that contain "INSERT" but the results from the preg_match() always turn up 0.

    Am I missing something?

    Thanks!
    John

  2. #2
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Phhhhhhhhttttt!

    *DUH*

    nm...

    User error...
    John


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •