Solved

simple sql statement

Posted on 2016-09-27
3
73 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
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.

752 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