473,326 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How to make a Query with diffrent variables, beeing empty or not?

Hello all, im new here so bare with me ;)

This is what i have:

$queryzoeken = ("SELECT SNR, SNM, SOMS, SVER, SSER, SLEV, SLIC, SLM
FROM software
WHERE SNR = $array[snr]

(!!if $array[snr is filled in then also look use it in the query!!)

AND snm = $array[snr]");
$result = mysql_query( $queryzoeken);

Explanation: User inputs one or more of these variables:
$array[snr]
$array[snm]
etc.
I need the server to look up the query with tha variables the use has
filled in, and leave out the ones that are empty.

Can anyone help me out with this?

Nov 12 '05 #1
0 872

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: wimmie | last post by:
Hello to all, I have a 'small' problem. I have made a application in php that connect trough ODBC to a Oracle RDB (VMS) or Basis+ database (VMS) and present the data to a user. There are 2...
3
by: Stefan Goerres | last post by:
Hello, I have put a function myfunc(val1, val2) which I call in a query. So far I only have arguments from the actual row there is no problem. But I can't make it working that i use a value from...
2
by: zion saal | last post by:
i wont to make a field in a select query to put two fields from a table into one field or control like " Expr1:&' '& " but the problem is thet "field1" is a Currency format and field2 is a...
6
by: Martin Lacoste | last post by:
Ok, before I headbutt the computer... don't know why when I add criteria in a query, I get an 'invalid procedure call'. I also don't know why after searching the help in access, the various access...
9
by: Patrick | last post by:
Hello I'm running two Webservers Using ASP.NET. both are running the same ASP.NET Application, with <sessionState mode="SQLServer" stateConnectionString="tcpip=127.0.0.1:42424"...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
5
by: Sam | last post by:
Hi, I have one table like : MyTable {field1, field2, startdate, enddate} I want to have the count of field1 between startdate and enddate, and the count of field2 where field2 = 1 between...
1
by: lawardy | last post by:
Hi, I'm quite new with Reporting server 2005. I'm wondering if there is a way to write a select query that will get the data from 2 diffrent tables located in 2 diffrent database box. for...
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.