Solved

simple sql statement

Posted on 2016-09-27
3
55 Views
Last Modified: 2016-09-27
Dear Experts,
I use 2 and in one sql statement,
but it is not working,
could you please check what's wrong with my code

$sql = "SELECT * FROM siparis where uid = '$uid' and _key = '$siparisno' and tedarikciOnay=''";

what I want is to select all data from siparis table where uid= $uid and _key = '$siparisno' and tedarikciOnay is empty
thank you
0
Comment
Question by:Braveheartli
3 Comments
 
LVL 6

Expert Comment

by:Mukesh Yadav
ID: 41817766
Any error you are getting because this query is fine.
0
 
LVL 22

Accepted Solution

by:
Ferruccio Accalai earned 500 total points
ID: 41817768
What do you mean with "it's not working"? Do you have any error or the result is different than expected?

Anyway I'd use
$sql = "SELECT * FROM siparis where uid = '$uid' and _key = '$siparisno' and tedarikciOnay is null";

Open in new window

1
 
LVL 1

Author Closing Comment

by:Braveheartli
ID: 41817771
thank you Ferruccio
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
nagios 4 php error after installation 6 69
Php Email function not working with Template 8 38
WordPress syntax 2 23
form button worked now it doesnt anymore 9 36
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now