Jump to content

Getting Familiar With Site Checklist


sebthib55

Recommended Posts

Hello,

I want to create script for my site that makes a user go through a checklist of things.

This checklist would have its own page and would list everything they must do and what they havn't yet done.

The user must do the entire list. If he/she doesn't, there is a banner that would display on all the pages until the new member would complete it. Once completed, the banner would disappear. This is so they get familiar with most features of the site.

 

Anyways, my question is, how can I organise my tables in my sql database? I don't want multiple entries per user, but I also want the script to run and check what they have and what they havn't done all together but no use too many queries.

 

I did think of making it complete a row for every task a user does, but when you go to check what tasks have been done, it may have to check through many entries, and make multiple searches.

 

Any ideas?

 

Thanks!

Seb

Link to comment
Share on other sites

I did think of making it complete a row for every task a user does, but when you go to check what tasks have been done, it may have to check through many entries, and make multiple searches.

Sounds like a good idea to me.

Link to comment
Share on other sites

I did think of making it complete a row for every task a user does, but when you go to check what tasks have been done, it may have to check through many entries, and make multiple searches.

Sounds like a good idea to me.

 

If I do this, would I have a

SELECT * FROM ______ WHERE user='user' AND task='2'

SELECT * FROM ______ WHERE user='user' AND task='3'

SELECT * FROM ______ WHERE user='user' AND task='4'

 

There could be 20 tasks. Then for the script that checks the banners, it would have to check all those entries to see if it must display or not. How would I combine all my SELECT queries into 1?

Link to comment
Share on other sites

Here is my script (template) It doesn't seem to work. What can I do to fix it?

 

$taskcheck=@mysql_fetch_array(mysql_query("SELECT taskid FROM newbie_checklist WHERE user='$exist[1]'"));

echo"<p><table width='50%' cellpadding='3' cellspacing='1' class='tableborder'>
<tr>
<td class='arcade1' colspan='6'><center><b>Task</b></td><td class='arcade1' colspan='6'><center><b>Completed</b></td>
</tr>";
echo"<tr><td class='arcade1' colspan='6'>
<center><b>Play 10 Games</b></td><td class='arcade1' colspan='6'><center>"; if($taskcheck[taskid]=="1"){echo"YES";}else{echo"NO";}echo"</td></tr>";
echo"<tr><td class='arcade1' colspan='6'>
<center><b>Post 10 Times</b></td><td class='arcade1' colspan='6'><center>"; if($taskcheck[taskid]=="2"){echo"YES";}else{echo"NO";}echo"</td></tr>";
echo"<tr><td class='arcade1' colspan='6'>
<center><b>Get 3 trophies</b></td><td class='arcade1' colspan='6'><center>"; if($taskcheck[taskid]=="3"){echo"YES";}else{echo"NO";}echo"</td></tr>";

echo"</table>";

 

Only the first task shows that it has been completed while I made the database take note of me completing 1 and 2.

Link to comment
Share on other sites

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.