Jump to content

Recommended Posts

what I am hoping to do is just reuse the original query and run a second query using the original $query (variable)

 

what I am seeking is the correct syntax

 

 $sql="select * from  my_table  where last='$query' and first LIKE '%$first%' ORDER BY first";

 

the above is not working

 

"$query is the original "last name" searched for

i don't understund your problem

is user input full last name or just part of it

is user input somethin from first name

can you post some example what user input, and what script must return

 

The initial query posts (last)  last and returns the records that match the "$query"

 

what I'm trying to do is run a second query (from an integrated form $first) that when submitted sorts the initial results by a second column (first)...where the second query input can be just a single letter (first initial etc)...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.