k1ngscorp1o
Members-
Posts
57 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by k1ngscorp1o
-
I've developed a new Arcade Script made with php 5.3 & PDO. The script is based off some other site a client wanted made I just developed better functionality and a better backend structure. The Script can be viewed here: http://arcade.cavellanderson.com/ I may sell it so if your interested in buying feel free to Msg me.
-
@guest - sniko is correct. @sniko / HD - I did that previously. I didnt get an error because the query was doing what it was set by default to do. FullText Search ignores words that occur in 50% of your rows which is why I did every debugging tactic in the book and it didnt work. Its hard to debug something when there is no error. It was a matter of me not fully understanding Full Text Search and not reading up on it and just attempting to use it without realizing { IN BOOLEAN MODE | WITH QUERY EXPANSION } were important. Thanks for your attempts at lessons on debugging but wouldnt have helped any...though because thats simple im sure you 2 knew that.
-
never mind it is working, I just didnt know about the 50% rule so I had to put it in bool mode so it would return.
-
Im wondering what I'm doing wrong, I've read through the tutorials and I'm not even getting errors back but its just not pulling my results. I hard coded the term in to make sure it was passed and its just not returning results...anyone see a problem... public function searchGames($term) { $search = $this->dbh->query("SELECT * FROM game_list WHERE MATCH (`name`,`desc`) AGAINST ('test')"); return $search->fetch(\PDO::FETCH_ASSOC); } Here is it in use: var_dump($mainModel->searchGames($term)); die; That keeps returning: boolean false or array empty
-
guess no one knows...
-
I am looking for some advice from people with experience uploading to their website with custom scripts. I essentially want to make an uploader, members will be able to input their name, desc, and category and I was wondering I wan can make it so they can upload their thumbnail with it. Is the upload its own form inside of the main form, or how would that work? Also what if I wanted 2 upload spots in the form, so: name desc upload 1 upload 2 [submit] Then on submit the images are uploaded to their correct places and stored in the database all at the same time. I may just be over thinking it but looking upt uploading for a few hours not sure how id get it working as 1 form.
-
Would this be correct, well its not working so I'd guess I did something wrong, but this is the function and then the function in use: public function searchGames($term) { $search = $this->dbh->prepare("SELECT `name`, `desc`, MATCH(`name`,`desc`) AGAINST (:term) AS `score` FROM `game_list` WHERE MATCH(`name`, `desc`) AGAINST (:term) ORDER BY `score` DESC"); $search->execute(array(':term' => $term)); return $search->fetchAll(\PDO::FETCH_OBJ); } Then in use: $term = $_GET['term']; foreach($mainModel->searchGames($term) as $game) { $mainTPL->newBlock('search_results'); $mainTPL->assign(array('name' => $game->name)); }
-
haha yea, no reason not to make the change here! I'll go with this. Thanks!
-
Ah :( all I use is InnoDB
-
I am making an arcade script and I want to search for words within the all the descriptions in the table and Im unsure how I'd do this is mysql. I know its possible to search through a string in php how would I type 'action' and look for the word action in the description of all the games and return the results with action in it?
-
thanks thats perfect!
-
Hey, I'm looking to for a calculation that allows me to put in a user rank and spits out the exp... rank 1 - 50,000 - start (x2 for rank 2) rank 2 - 100,000 x 2 rank 3 - 200,000 x 2 rank 4 - 400,000 x 2 rank 5 - 800,000 x 2 rank 6 - 1,600,000 x 2 rank 7 - 32,000,000 x 2 rank 8 - 64,000,000 x 2 rank 9 - 128,000,000 - End The base EXP is 50k so thats rank 1 and it you do rank 1 times 2 it gives you rank 2 and if you do rank 2 times 3 it gives you rank 3. I'm looking for a mathematical equation to do this. Yea there are numerous ways to do this with php but I want an equation that does it. Does anyone know how?
-
Thanks you 2 were very helpful!
-
Im trying to code a system where there is a minus button a bar showing how full your stat is and then a plus button, on minus the bar goes down and on plus it goes up. I've been looking for different ways to do this all day and the closest I've found is this: HTML: <div style="background-color:white; width:10%; height:100%;"></div> I need to access that 10 right before the percent sign and manipulate that number but Im unsure how with any method. JS: $(function(){ var valueElement = $('#test'); function incrementValue(e){ valueElement.text(Math.max(parseInt(valueElement.text()) + e.data.increment, 0)); return false; } $('#stat1_plus').bind('click', {increment: 1}, incrementValue); $('#stat1_minus').bind('click', {increment: -1}, incrementValue); }); I think this would be the functionality im looking for but combining this with a bar Im not sure how to go about doing it. Has anyone done something similar or know an alternative?
-
Would it be based of their experience, or stats or all of them combined? You have to figure out what you want your ranking based off then its just writing a calculation.
-
Hey everyone. I'm trying to basically learn how to make a gallery where if you click on the images its selected and stored. The goal is for the user to be able to select a certain amount of images and then when they have selected enough it stores the details in the database. How would I disable selected images once one has been clicked and how would I store these on click and count. Anyone who has some experience with something similar any help would be appreciated.
-
Yes its stored in the database and yea you can always change the table name. Also if you have 2 columns with the same name and would need that to differ for some reason if they were to join, you could still manipulate that with sql as opposed to making new names each time. My users table I name the user id "id" and every other table its "user_id" but it shouldn't cause any problems.
-
you simply input the user_id of the player your trying to pull. I only did the logging part, the part where you would actually use those player Ids to get the players names and then input your "msg" I didnt create that. This only logs based of a user_id. It doesnt matter what any other system names the user id. And more than likely your attack id and defender id as well as to and from should be using foreign keys to have that relationship right back to the users table so in the end logging is only ever affected by the users table and the table used for logging should have the same FK relationship with users. I think that answers your question. It only takes a user id and msg. For the log to actually be written...The part to say "Cavell sent Dayo $100" I didnt do that. If you have a transfer system, you should already display that message to your user, all you have to do is place that message in a variable and log it.
-
I made it flexible. Its not built directly into any 1 application so it can be used in many applications now. Code is meant to be re-usable and somewhere down the line I can see this easily being edited to work for other things. Plus I dont even own a copy of mccodes nor would I bother digging through all those files. It gives me a head ache viewing messy folders. Does that answer your question? Thats my interpretation of it so hopefully it did. Also very good job staying relevant ;)
-
I finished 1 free mod someone requested. Its a very simple activity logger and only took 20 minutes. I was going to add different types of actions which would allow individual logs to be retrieved for the exact action an admin would be looking for but since this was for the users it wasn't needed. More functionality can easily be added to it, if anyone else wants it feel free to PM me. Requires php 5.3+ I used PHP(OOP) & PDO for the script. Can be viewed here: http://s24.postimg.org/4rhdryq5h/activity_log.jpg
-
Thanks for your post Razor. Some good ideas there I may do a few of them. Thanks for the feedback of my portfolio as well, that's definitely something worth adding in.
-
That thread says nothing about how reliable I am as a programmer. It shows Kyle doesn't like me and it shows a year ago I was ignorant and rude. Nothing more. You could argue I don't have the most appealing personality but even thats not backed up since that's one post and it was to a guy I didn't care for and even then I took my problems to him. I didn't post them around this site for no reason. That does not show my development background, nor does it even show my experiences with any client or how reliable I am or were even then. That post is 100% irrelevant to this topic, so I'll say again. Please dont post here if you have nothing relevant to post. I will also say again, if you have a problem with me, bring it to me.
-
Hmm...Free work, I may just be losing it but I fail to see any risk. I've spent a great deal of my time bashing those on this forum for being horrible developers and for once I'm offering a service for free to help and you wish to bring negativity here. Please grow up. Kyle may have a problem with me and my opinion of him which I shared with him, but his purpose of making it public first off was unclear, and your purpose of re-posting it now is just as meaningless. If you have nothing on topic, or of any importance to say please refrain from posting on this topic. Thanks. - - - Updated - - - Thanks for the heads up, never noticed that before. What browser are you using?
-
For those of you who don't know who I am I'm Cavell Anderson a backend web development specialist. I'm going to be making free mods for a while to do some portfolio building. It doesnt matter the engine or framework your using I'll still code the mod if I see it as an interesting piece to add to my portfolio. If you have suggestions or things you want to see done feel free to post it here, these mods will be the property of who ever I code it for and they can do whatever they please with it as long as credit remains given! Feel free to PM me if you have an idea you dont want to post but you need coded, I'll still consider it. My Portfolio: http://www.cavellanderson.com/
-
actually never mind this can be removed, just had to set the in_array() function to strict