Member Avatar for mrkm1188

I have a table with the following fields: client, project number, project manager, project manager email
I have a form with text fields for each field of the table and I want to have a query run when the user presses a button on the form. How to i make the query only pick the data from the fields that the user entered information into?

for example:
client: AAAA
project number: <null>
project manager: EFudd

I want the query to only pull information that matches the fields that are populated by the user

Recommended Answers

All 3 Replies

how about SELECT * from table where projectNumber is not NULL

Member Avatar for mrkm1188

I'm sorry maybe I didnt explain it well enough.

With this example,

client: AAAA
project number: <null>
project manager: EFudd

I only want the result to return any project that has client AAAA and project manaher EFudd.

That is still a very simple select statement as I posted earlier, just add the columns you want to the where clause.

WHERE client is not null and project manager is not null

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.