close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Need Advice - Using SA/DA for running club site

Thread began 2/04/2014 4:10 pm by Brendan | Last modified 3/20/2014 9:30 am by Jason Byrnes | 2950 views | 19 replies |

Brendan

Need Advice - Using SA/DA for running club site

I have a couple of questions, anyone who's able to offer suggestions/advice, I really appreciate it.

Function - I want to allow the runners to "sign in" so that I can track attendance. Prizes are given after 10, 50, 100 runs etc, so I need to be able to run a report that shows a "total number of runs attended".

My approach? - I thought I could create a page where the members can enter their email address and password and submit. On submit, I want to Post (i think) to my table, user_ID (user id and email address in another table), the date (dd/mm/yy), and a default integer of "1" in run_Total column.

Then, on my report, I thought I could use a calculation like SUM(run_Total)


I'm not a coder, so am familiar with support tickets, but was hoping to at least get on the right path first.

Sign in to reply to this post

Jason ByrnesWebAssist

use security assist to create a login system

once the user logs in, they could go to a page to submit a run

you would need a table to contain:
date
distance
userID

and other information about the run.


when the user logs in, their ID is stored in a session.

use a form top collect the distance and insert to a database table with the data and the usersID

then you could use sum() like you suggested to return the total runs for a specific uer,

Sign in to reply to this post

Brendan

Thank you for your help so far. The club gives members a prize after their 10th run, so i'm trying to create a search page that will return the first/last of runners who meet criteria:

sum(runQty)=10, and
(prize_Received) = 0, and
rundate = [today's date] --- each "run record" includes run_Id, user_Id, run_Date (dd:mm:yy), run_Qty (default 1)

Which should return results that include runners who have 10 runs, including one on the specified day, and who have NOT received a prize yet.

I'm struggling with understanding how to create the search parameters in the search wizard. I clearly know just enough about this to understand what I should do, but not enough to understand how to do it. Sorry.

Ideally, the results would simply show the firstname/lastname from the users table, and to really push my luck, i'd like to be able to have a checkbox next to each where i can indicate which users received the prize and update multiple records at once. simply a "1" in the prize_Received column.

If this is too much for the forum, I'd like to setup a 1-2 hour advanced support call for Monday.

Thank you for all of your help!!

Sign in to reply to this post

Jason ByrnesWebAssist

YEs, you will need to sign up for a premiere support appointment for this, you can sign up here:
http://www.webassist.com/premier_request.php

Sign in to reply to this post

Brendan

Ray helped me build this code to find users with 10 runs. How could I also add criteria that the current date must be included in the runs database?

code from premium support:
SELECT sum(run_QTY) AS runs, users.user_Id, user_First, user_Last, user_Email, user_Pword, user_Size FROM users INNER JOIN runs on runs.user_Id = users.user_Id WHERE user_Received10 = 0 GROUP BY users.user_Id HAVING runs >= 10 ORDER BY user_Last ASC

Could I simply state WHERE user_Received10 = 0 AND runs.run_Date = (date("Y-m-d"))?

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to use DATE_FORMAT


AND DATE_FORMAT(runs.run_Date, "%y-%m-%d") = DATE_FORMAT(NOW(), "%y-%m-%d")

Sign in to reply to this post

Brendan

I"m getting Parse error: syntax error, unexpected '%' in /isrc/10runreport.php on line 105

line 105

"SELECT sum(run_QTY) AS runs, users.user_Id, user_First, user_Last, user_Email, user_Pword, user_Size FROM users INNER JOIN runs on runs.user_Id = users.user_Id WHERE user_Received10 = 0 GROUP BY users.user_Id HAVING runs >= 10 AND DATE_FORMAT(runs.run_Date, "%y-%m-%d") = DATE_FORMAT(NOW(), "%y-%m-%d") ORDER BY user_Last ASC"

Sign in to reply to this post

Jason ByrnesWebAssist

try using single quotes instead of double quotes.

Sign in to reply to this post

Brendan

that fixed the error, but it isn't displaying any results.

i have a user with 14 "runs" most of which I just entered so several of them have the date in the database as 2014-02-20.

sorry i'm struggling with this, and thanks for all of the help

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

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