#1
|
|||
|
|||
Database functions?
I see that there are normal ways of going about deleting certain rows in the database (I.E. All adopts with the owner "None") And there are ways to count rows (I.E. Counting all adopts that you own that are under level 5 so you can limit eggs when adopting) but they seem to be hard to incorporate with the normal way that the database functions are handled. Is there any way to go about this in the same way but with the whole "$mysidia->db-> stuff?
(Currently working on a random adopt maker, it's getting fun (even though a simple show description of the adopt it's showing is getting annoying XD)) |
#2
|
||||
|
||||
Well its easy to delete certain rows, the below code gets rid of every entry that has owner as 'none' in table prefix_owned_adoptables.
PHP Code:
PHP Code:
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#3
|
|||
|
|||
Oh that is actually really awesome! I wasn't expecting it to be so straightforward now XD
AWESOME I got it to work :D Last edited by Infernette; 07-04-2013 at 11:17 PM. |
#4
|
|||
|
|||
Okay I got everything else to work but now the page isn't recognizing the adopt like the other pages I made. This is going to be hard >.<
Here's all the code in case it matters (duplicated/modified the daycare page) Last edited by Infernette; 07-05-2013 at 09:26 AM. |
#5
|
||||
|
||||
Well copying/pasting pages is kinda tricky for sure. First of all, the lang vars need to be modified properly. You need to create a lang file inside the folder /lang with the appropriate lang var defined in array format. On the other hand, keep an eye on the naming conventions/patterns for your class method names.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#6
|
|||
|
|||
yeah I'm way past that step, I just can't seem to get the adopt function to work with $adopt->*whatever* which is kinda odd since it has worked with any of the other pages I've made.
I might try to get the adopt ID from the URL and work it to use that to get the info, but it seems to be a complicated process and none of the tutorials help with using slashes instead of the old mys way >.< I guess while I mull over how to do that I should work on making companions and art for them, so no more questions for now XD Thanks :) EDIT: Holy carp I just realized I can just move the adopt function to a different page and it'll still work. HERPDERP. >.< Last edited by Infernette; 07-07-2013 at 10:50 PM. |
#7
|
||||
|
||||
lol... So is it safe to assuming that you've gotten it to work? Anything else still going wrong?
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#8
|
|||
|
|||
Arguing with it to make multiple types (Rand y u no listen ) but other than that I think I have everything to get this site done in 16 days XD
Except cron jobs. But looking into alternate ways is easy... Last edited by Infernette; 07-08-2013 at 05:47 PM. |
#9
|
||||
|
||||
I see, looks like you are making some progress. Cron jobs can be a pain to work with, you can actually simulate cron jobs with PHP simply by having scheduled tasks run whenever a user visits the page, a member, guest or even bot wont really matter here. Make sure to check whether the cron jobs should run by comparing datetime string/integer, otherwise you may end up with multiple cron jobs executing at times they really should not.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding Item Functions - help! | Missy Master | Questions and Supports | 4 | 06-30-2014 08:50 PM |
Problem whit functions.php edition | Jocla | Questions and Supports | 8 | 03-03-2013 12:28 PM |
Something wrong in my functions.php | Abronsyth | Questions and Supports | 2 | 04-29-2012 03:01 PM |
Suggestions for default Item functions | Hall of Famer | Suggestions and Feature Requests | 36 | 01-14-2012 09:21 AM |
image under functions.php | PokePets | Questions and Supports | 4 | 08-09-2010 07:46 AM |
What's New? |
What's Hot? |
What's Popular? |