473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Give suggestions for nested query...

tharini
Expand|Select|Wrap|Line Numbers
  1. 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());
  2.  
is my query syntax right? if not please tell me the correct syntax.
Aug 18 '10 #1

✓ answered by mwasif

The problem was with the double quotes. See the correct code below
Expand|Select|Wrap|Line Numbers
  1. 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());
I don't know if you still have problem with the query. To get quick response always state the error you are facing.

2 1258
code green
1,726 Expert 1GB
We are not proof-readers.
Please state a problem or error
Aug 19 '10 #2
mwasif
802 Expert 512MB
The problem was with the double quotes. See the correct code below
Expand|Select|Wrap|Line Numbers
  1. 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());
I don't know if you still have problem with the query. To get quick response always state the error you are facing.
Aug 19 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Polar | last post by:
I am having troubles finding the parse error in this script. I've been checking for weeks. I am too new to the subject I guess. I am trying to show a readord and them have a form at the bottom...
7
by: K. Crothers | last post by:
I administer a mechanical engineering database. I need to build a query which uses the results from a subquery as its input or criterion. I am attempting to find all of the component parts of...
2
by: lawrencep | last post by:
I have a group of equipment from which monthly data is collected. I'd like to be able to produce a running 12-month report that displays the data collected. The crosstabs and transforms all...
9
by: deko | last post by:
I need to create a Recordset of all records that appear in one table but do NOT appear in another. To get the records that appear in BOTH tables, I can do this: SELECT tblEntity.Entity_ID...
6
by: Leonardo Santos-Macias | last post by:
I would like to query a nested query string go.aspx?redirect=to.aspx?par1=value1&par2=value2 The problem is that inside go.aspx, Request.QueryString("redirect") only gives me ...
6
by: John | last post by:
Hi I have the following query; SELECT Clients.ID, Clients.Company, Clients. FROM Clients WHERE Clients. Not In (SELECT FROM ) When I do not use the keyword Not it works but not with...
14
by: sudheerk | last post by:
please give me a query for already existing name in the data base using mysql
0
by: wadesharp | last post by:
I would like to write a query to return nested data. The data has a master, child relationshiop and teh child is linked to the master record through the 3 column (LinkedKey). The reason this is all...
3
by: nannu | last post by:
Hi, i am using the following query string query = "SELECT *"+ "FROM DataSet"+ "WHERE Param_ID =(Select Data1 from testcases where TestCaseID='TC001') DataAdapter da=new DataAdapter();...
7
by: Kelii | last post by:
Well, I've been searching around the groups for an answer to this one, and none of the suggestions seems to be working for me. I'm almost positive that this is a simple fix, but for the life of me...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.