- This topic is empty.
-
AuthorPosts
-
April 1, 2011 at 5:58 pm #32207PokerAcesKidMember
Okay so I created a theme for my website that will also utilize a custom CMS script I developed and its not cooperating with me nicely.
Here’s my head of my header file for my template:
>
:
' />
Now on my index page that calls the header file I DO NOT get a error saying that the file could not be located. So that’s good news. Here’s my dbconfig.php file.
/**
* @author Jeff Davidson
* @copyright 2010
*/
// This file contains the database access information and establishes a connection to MySQL and selects the database
// Set the database access information as contstants
DEFINE ('DB_USER', '?');
DEFINE ('DB_PASSWORD', '?');
DEFINE ('DB_HOST', '?');
DEFINE ('DB_NAME', '?');
// Make the database connection
$dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (!$dbc) {
die('Connect Error (' . mysqli_connect_errno() . ') '
. mysqli_connect_error());
}
?>Now when I go to one of my custom pages like this one it brings up the message:
Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/xtremer/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 38
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in /home/xtremer/public_html/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 39
KOW Champions and Contenders
$championsQuery = "
SELECT
titles.titleName,
titles.shortName,
champions.champID,
champions.con1ID,
champions.con2ID,
champions.con3ID,
biochamp.shortName AS championshortName,
biochamp.characterName AS champion,
biocon1.shortName AS con1shortName,
biocon1.characterName AS con1,
biocon2.shortName AS con2shortName,
biocon2.characterName AS con2,
biocon3.shortName AS con3shortName,
biocon3.characterName AS con3
FROM
champions
LEFT JOIN titles AS titles
ON titles.ID = champions.titleID
LEFT JOIN characters AS biochamp
ON champions.champID = biochamp.ID
LEFT JOIN characters AS biocon1
ON champions.con1ID = biocon1.ID
LEFT JOIN characters AS biocon2
ON champions.con2ID = biocon2.ID
LEFT JOIN characters AS biocon3
ON champions.con3ID = biocon3.ID
WHERE
titles.statusID = '1'
ORDER BY
titles.ID";
$championsResult = mysqli_query($dbc, $championsQuery);
while ( $row = mysqli_fetch_array ( $championsResult, MYSQLI_ASSOC ) ) {
$fieldarray=array('titleName','shortName','championID','championshortName','champion','con1ID','con1','con1shortName','con2ID','con2','con2shortName','con3ID','con3','con3shortName');
foreach ($fieldarray as $fieldlabel) {
${$fieldlabel} = $row[$fieldlabel];
}
?>
< ?php echo $titleName ?>
< ?php
if (file_exists('images/championshots/'.$titleshortName.'/'.$championshortame.'.png')) {
echo "n";
} else {
echo "n";
}
if (strlen ($champion) < 1) {
echo "Vacant";
} else {
echo "".$champion."n";
echo "(Since TBD)";
}
?>
Contenders
- TBD";
} else {
echo " - ".$con1." n";
- TBD";
} else {
echo " - ".$con2." n";
- TBD";
} else {
echo " - ".$con3." n";
< ?php
if ( strlen ($con1) < 1) {
echo "
}
if (strlen ($con2) < 1) {
echo "
}
if (strlen ($con3) < 1) {
echo "
}
?>
< ?php
}
?>
April 4, 2011 at 4:38 pm #52279PokerAcesKidMemberAnybody have any ideas on why this is happening?
April 10, 2011 at 11:48 am #51645PokerAcesKidMember*bump*
April 13, 2011 at 3:15 pm #51533PokerAcesKidMemberIs there anyone that knows?
- TBD";
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.