mysql query into NATS4 database - link change - adult site

This project received 5 bids from talented freelancers with an average bid price of $206 USD.

Get free quotes for a project like this
Project Budget
$30 - $250 USD
Total Bids
Project Description


I need a mysql query for my adult website....and NATS4....

here are instructions...


I will move all forum users to NATS as NCR users...."free"

member into nats as "active"


mysql query that exist now:


when user login into blog page....

the query check if his username exist into forum db only

if yes... create username into blog and tube db.....

and make sync


when user login into blog

the query check if he is into blog already (means that he is included into forum and tube)

if yes , check his blog membership package.......

and modify permissions into forum and tube

free or member

mysql query that we need to create

1. when user login into blog page

the query check if username exist into NATS db only

if yes, create username into blog-forum-tube db

and make sync works into my site (is already active)

2. when user login into blog page, if he already exist into blog......

the query check if membership package into NATS db

if NCR or active member, or no active

if NCR...assign "free" package into YM

if no-active...ex-member.......assign "free" package into YM

if active....assign "member" package.

---nats table------------------------------------------------------------------

When querying the NATS db for authentication, you will first need to query the member table with a query similar to this.

select memberid, status from member where username = 'some username' and siteid = 'X';

Where X is the id of the site the member is trying to login into. If you want to add a concept of network

(join one site have access to all) you can remove siteid from that query all together or provide a list of site ids.

You will end up with something like this.

select memberid, status from member where username = 'some username';

Or something like this.

select memberid, status from member where username = 'some username' and siteid in ('X', 'Y', 'Z');

If you are going with a network concept, I strongly suggest making sure that member usernames are unique across all sites.

You can do this by setting UNIQUE_MEMBER_NAMES value to 'For all sites' on the NATS config admin -> surfer page.

Otherwise the last 2 queries might return multiple records.

Once you have the member record, you can examine the status field.

0 = Never joined - just filled out the NATS join form for a paid join option but did not get approved by a biller

1 = Active (NCR or paid)

2 = Expired

To distinguish between NCR or paid, you will need to do an additional query against the member_subscription table.

select optionid from member_subscription where memberid = 'memberid from the member query above' where active = 1;

You will then need to look at the optionid value for each result row that you get. If the value of the optionid field corresponds

to the NCR join option for all rows, then this is an NCR member. If optionid value corresponds to a paid join option for any

of the records, then this is a paid member. You can get the option id value from NATS site admin -> options.

It is in the first column (labeled ID).


change links into all site.. join and upgrade....

also into video redirection

normal join page

[url removed, login to view]<?=$_REQUEST['nats']?$_REQUEST['nats']:'MC4wLjEuMS4wLjAuMC4wLjA'?>&step=2

upgrade link for NCR (or ex-members) to active member

[url removed, login to view][username]=<username>&signup[email]=<email>

link must be dinamic....and take username and email of the user that is logged IN

into join page...username and email must be this way the user cannot change them during upgrade

lost password link

my site: [url removed, login to view]~1~


delivery to me the doc about mysql query into nats.....with all variables.....

Skills Required

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online