Solved

simple sql statement

Posted on 2016-09-27
3
65 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 8

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

856 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