• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 89
  • Last Modified:

simple sql statement

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
Braveheartli
Asked:
Braveheartli
1 Solution
 
Mukesh YadavFull Stack DeveloperCommented:
Any error you are getting because this query is fine.
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
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
 
BraveheartliMarketingAuthor Commented:
thank you Ferruccio
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now