close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Alphabetizing our member database

Thread began 8/06/2014 1:10 pm by gail.bergan407744 | Last modified 8/08/2014 12:47 pm by Jason Byrnes | 3490 views | 23 replies |

gail.bergan407744

Alphabetizing our member database

I've built a list_users.php page using the old DW behaviors. I'm wondering if your MySQLi extension can do the same thing. In the attached file, you'll see that I have a clickable A-Z list; when our admins click on a letter of the alphabet, the resulting page gives a filtered list of members whose last names start with that letter. I looked at your pagination tutorial and I think I need something a bit more robust than that.

I have a new recordset called list_users_i.php using your extension, but there are still elements from the old behavior in the coding, such as lines 23-50, as well as my Show If and Repeat Regions behaviors. I realize these will need to be regenerated with your extension. My first question is, can you do an A-Z list? Second question is, which lines of that old code need to be axed?

Sign in to reply to this post

Jason ByrnesWebAssist

In the recordset use the advanced editor and add another condition to the where clause:

AND (lastname LIKE paramLetter OR -1 = paramLetter2)

in the variables section, create 2 new variables as:

name: paramLetter
type: Begins with text
default value: -1
run time value: <?php echo(isset($_GET['letter'])?$_GET['letter']:""); ?>

name: paramLetter2
type: integer
default value: -1
run time value: <?php echo(isset($_GET['letter'])?$_GET['letter']:""); ?>


as for the code that needs to be removed from the page, you need to remove any code that relates to the old recordset.

Sign in to reply to this post

gail.bergan407744

I'm sorry, I don't understand...what type of variable am I creating? Under Bindings, there is Form Variable, URL Variable, Session Variable, Cookie Variable, Server Variable, and Environment Variable.

Sign in to reply to this post

Jason ByrnesWebAssist

Use the advanced recordset view, not the simple view.

In the advanced view, there is a section for variables to create the 2 variables that are needed.

Sign in to reply to this post

gail.bergan407744

OK, I see what you mean. I've added the variables.

There is still apparently some coding errors (I am always pointed to line 28), but when I try to delete the line, it tells me it is rejecting the change. Do you see anything in the attached file?

By the way, I've replaced the Show If and Repeat Region with your scripts.

Attached Files
list_users.php
Sign in to reply to this post

Jason ByrnesWebAssist

the code block at lines 14 - 28 does not have a closing php tag.

I think that code blank can be removed. it was for the original recordset.

Sign in to reply to this post

gail.bergan407744

I know. But it won't let me delete those lines of code, or add the closing php tag. I've never seen that before.

Sign in to reply to this post

Jason ByrnesWebAssist

dont know why it wouldn't let you, try opening the page using a text editor instead of Dreamweaver to remove the code.

Sign in to reply to this post

gail.bergan407744

Well...the text editor let me delete the lines, but apparently some of them had something to do with my template. The display of the page in Design view is all off. (However it is correct in a browser).

But the more egregious problem is that the alphabetization is not working. It simply dumps our entire membership into the page; they are alphabetized to a point (when I originally set up the database) but then members added thereafter are all in a jumble. When I try to click on any of the A, B, C, ... links, I get No Records Found. Clearly this is not sorting correctly. See attached.

One thing I just noticed: when we made changes to the WHERE clause, DW created a whole new recordset called Recordset1. It still has those changes in my original listUser_i recordset, but now I have this additional one. Is this a problem?

Attached Files
list_users.php
Sign in to reply to this post

Jason ByrnesWebAssist

when you deleted the code block, you also deleted the HTML tag line:

<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/New_template_2010.dwt" codeOutsideHTMLIsLocked="false" -->


that should be added back



i dont see the additional recordset you mention on your page, only the listUsers_i recordset.

to troubleshot the listUsers_i recordset, add the following code in the body to write the SQL to the page:

<?php echo($listUsers_i->debugSQL()); ?>

Sign in to reply to this post
loading

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...