Solved

simple sql statement

Posted on 2016-09-27
3
46 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
Comment Utility
Any error you are getting because this query is fine.
0
 
LVL 22

Accepted Solution

by:
Ferruccio Accalai earned 500 total points
Comment Utility
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
Comment Utility
thank you Ferruccio
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 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