SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    SitePoint Guru
    Join Date
    Sep 2008
    Posts
    977
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RESOLVED:: Select with join and AND bd.bleh IN ( $string ) not working

    Hi,
    Edit:

    GOT IT. I changed it to do another select instead of using the array/hash or, anything else.


    I have a working query which when I add a familiar line to it, stops working and throws an error.

    Code mysql:
    SELECT
           a.place
         , a.more
         , a.even_more
         , b.another
       FROM address a
       INNER
       JOIN business_details b
       on b.bleh_id = a.bleh_id
       and b.stuff IN ( @array )

    error
    Code:
    DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'array element 1 array element 2 array eleme' at line 14 at ../cgi-bin/script.pl line 77
    I have tried it with a string/variable as well and the error seems to be the same.

    Can any of you cast an eye over it to see what I have missed.

    bazz
    Last edited by IBazz; Jan 27, 2009 at 18:15.


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
  •