wulfric Posted March 31, 2017 Share Posted March 31, 2017 I just wanna change things up a bit to better compete against bluehost - an example partner affiliate link they use is: http://www.bluehost.com/track/username Question: When next person activates affiliate, how do I make it so they are domain.com/aff(dot)php?aff=420 Right now, if someone activates the affiliate, they become number domain.com/aff(dot)php?aff=50 It looks like there is five tables, will I need to alter each of them? Some neat ideas • randomize affiliate ID # • change pattern, from +1 each affiliate, to maybe +37 each activation • tweak affiliate naming scheme to something like domain.com/****-{$client.id.firstname} * = random acceptable numbers / letters 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 31, 2017 Share Posted March 31, 2017 tblaffiliates is the one to look at - the value of id in there will be used as the affiliateid in the others.... and I wouldn't suggest editing existing id values! 0 Quote Link to comment Share on other sites More sharing options...
wulfric Posted April 1, 2017 Author Share Posted April 1, 2017 tblaffiliates is the one to look at - the value of id in there will be used as the affiliateid in the others.... and I wouldn't suggest editing existing id values! Alriiiiight! To get the type of results I desire, do you recommend I alter table and do auto increment stuff? I didn't make any tweaks yet, still learning. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted April 1, 2017 Share Posted April 1, 2017 Some neat ideas • randomize affiliate ID # • change pattern, from +1 each affiliate, to maybe +37 each activation you can specify next affiliate ID by running this SQL $nextAffiliateID = {Last-Affiliate-ID} + 24; ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID'; • tweak affiliate naming scheme to something like domain.com/****-{$client.id.firstname} * = random acceptable numbers / letters you can do that, I can think of simple way to do it using htaccess to handle it, and maybe actionhook/template edit to display the new format for affiliates to copy 0 Quote Link to comment Share on other sites More sharing options...
wulfric Posted April 2, 2017 Author Share Posted April 2, 2017 I ended up just clicking alter table, and typed in 24 and pressed enter. I hope I did it right. I made a (2) test account and activated affiliate, and it picked up on the number I expected. Thanks guys! --- Thanks to your reply though, it pointed me into the right direction and I reckon I got the results I desired. Not sure why I was getting errors inside Adminer, I tried a couple of things, but none of them worked. $nextAffiliateID = {Last-Affiliate-ID} + 24; ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID'; $nextAffiliateID = 55 + 55; ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID'; $nextAffiliateID = {55} + 214; ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID'; $nextAffiliateID = {Last-Affiliate-55} + 24; ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID'; $nextAffiliateID = 55 + 24; ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID'; $nextAffiliateID = {Last-Affiliate-55} + 24; ALTER TABLE `tblaffiliates` auto_increment = '$nextAffiliateID'; 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.