Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Joining Tables (http://www.mysidiaadoptables.com/forum/showthread.php?t=3574)

SilverDragonTears 04-09-2012 11:05 PM

Joining Tables
 
Yes I changed $pet to $row

PHP Code:

$row $adopts->join("adoptables""adoptables.type = owned_adoptables.type")->select("owned_adoptables", array(), constant("PREFIX")."owned_adoptables.aid = '{$aid}'")->fetchObject();  


if(
$row->currentlevel == '6') {
$article_content .="<p align='justify'>{$row->adultdescript}";
}else if(
$row->currentlevel == '5') {
$article_content .="<p align='justify'>{$row->hatchmdescript}";
}else if(
$row->currentlevel == '4') {
$article_content .="<p align='justify'>{$row->hatchdescript}";
}else if(
$row->currentlevel <= '3') {
$article_content .="<p align='justify'>{$row->description}";



Hall of Famer 04-09-2012 11:24 PM

Well the problem may be with the $aid in the where clause. As I said before, this was just a rough example. It assumes that your adoptables id are stored in variable $aid, if the variable name is not $aid, or that you aint using adoptables id to fetch information, you will need to modify the where clause.

SilverDragonTears 04-09-2012 11:26 PM

What should I change it to? I'm lost about it..

Edit: I don't give myself enough credit...
Code:

constant("PREFIX")."owned_adoptables.aid = '{$id}'")
That worked. I have another issue... Should I make a new thread? Dragons won't show up in siggies

Hall of Famer 04-09-2012 11:34 PM

Oh dragons wont show up in siggy? The same adoptables id problem? Check if you get rid of is_numeric() from every php page. XD

SilverDragonTears 04-09-2012 11:36 PM

Don't I just need to make sure it's not in siggy.php? Which I did...

Hall of Famer 04-09-2012 11:55 PM

I do not have this problem from the demo site, nor do I have trouble using bbcodes from TOD.

SilverDragonTears 04-09-2012 11:59 PM

Test:

http://taleofdragons.net/get/4G6jD.gif

What on earth....

Hall of Famer 04-10-2012 12:04 AM

So you see? Its not a problem at all. XD

SilverDragonTears 04-10-2012 12:12 AM

LoL... I must be tired!

Hall of Famer 04-10-2012 12:20 AM

Alright guess thats it, I understand the frustration of having to start over when you already have a community with 500 members and 2500 posts. You must be overexhausted, take a rest now if you have to. XD


All times are GMT -5. The time now is 01:50 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.