close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Pointer in the right direction required

Thread began 9/11/2009 6:30 am by John Langer | Last modified 9/14/2009 12:02 pm by John Langer | 3172 views | 6 replies

John LangerBeta Tester

Continuing on from this I now have a problem with the SQL

PHP MySql

I have three recordsets on the page (all created through DW server behaviours)

The aim is to have a list of people to choose from (see above) but exclude those that appear in another list.

So the first recordset gains it's ID from a previous page and the ID is given through a URL parameter "../add_to_list/add_member_to_list.php?listID= ) This gives the result of "95" in my testing instance.

Recordset name = rsList
SELECT id, name
FROM bbc_lists
WHERE id = colname

colname=
integer -1
runtime value = $_GET['listID']

This is tested and works.

The second recordset takes that ID and lists all the people who are already in it

Recordset name = rsListMembers
SELECT person_id, list_id, id
FROM bbc_listmembers
WHERE list_id = colname

colname =
integer -1
runtime value= $row_rsList['id']

tested and works.

The third recordset is the one that is proving troublesome. It is supposed to list the people (which it does) but not those that appear in the second recordset

Recordset name = rsPeople
SELECT id, firstname, lastname, realmail
FROM bbc_people
WHERE id <> colname
ORDER BY lastname ASC

colname =
integer -1
runtime value = $row_rsListMembers['person_id']

The rsListMembers recordset returns two "people" (in my testing scenario)

The result of running the third recorset is that the first person to appear in the list is omitted (correctly) but the second person remains. So it would appear that it doesn't "run through" the table to get to the second name. It stops after reaching the first one.

I'm sure it's something simple but it baffles me.

Any help, as always, most appreciated.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...