Give suggestions for nested query...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tharini
    New Member
    • Aug 2010
    • 9

    Give suggestions for nested query...

    Code:
    mysql_query("select * from member_details where name='".$name."' or wife_name='".$name."' and ( hus_dob='".$date."' or wife_dob='".$date."' or wedding_day='".$date."'")) or die(mysql_error());
    is my query syntax right? if not please tell me the correct syntax.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    We are not proof-readers.
    Please state a problem or error

    Comment

    • mwasif
      Recognized Expert Contributor
      • Jul 2006
      • 802

      #3
      The problem was with the double quotes. See the correct code below
      [CODE=php]mysql_query("se lect * from member_details where name='".$name." ' or wife_name='".$n ame."' and ( hus_dob='".$dat e."' or wife_dob='".$da te."' or wedding_day='". $date."')" ) or die(mysql_error ());[/CODE]

      I don't know if you still have problem with the query. To get quick response always state the error you are facing.

      Comment

      Working...