TheMayhem
03-09-2009, 05:53 AM
So I assume I am going to learn something new today with vBulletin. I have a plugin that runs this wonderful query.
// Get Pay Per View Results
$ppv = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "ppv where id='1'");
And this query runs on a vBulletin global start. It works perfectly fine and I am able to retrieve certain parts of the table that I am selecting from. So I go to insert an array of data into the template and I try
$ppv[ppv_name]
And it works perfectly fine. So then I try and insert another part of the array to display for users which is
$ppv[1_wrestler1]
And the template errors start coming
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/tmforum/public_html/includes/adminfunctions_template.php(3938) : eval()'d code on line 1
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.[/quote]
I could put this on line 1 or line 51 no matter what or any other part of that $ppv array that I try to insert and it gives errors gallore. So I guess my question is what in vBulletin or programming mechanics could cause this when there is no if statement in there and why would it only sound off the alarms for certain parts of the array even though all data type of that array are the same.
// Get Pay Per View Results
$ppv = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "ppv where id='1'");
And this query runs on a vBulletin global start. It works perfectly fine and I am able to retrieve certain parts of the table that I am selecting from. So I go to insert an array of data into the template and I try
$ppv[ppv_name]
And it works perfectly fine. So then I try and insert another part of the array to display for users which is
$ppv[1_wrestler1]
And the template errors start coming
The following error occurred when attempting to evaluate this template:
Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/tmforum/public_html/includes/adminfunctions_template.php(3938) : eval()'d code on line 1
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.[/quote]
I could put this on line 1 or line 51 no matter what or any other part of that $ppv array that I try to insert and it gives errors gallore. So I guess my question is what in vBulletin or programming mechanics could cause this when there is no if statement in there and why would it only sound off the alarms for certain parts of the array even though all data type of that array are the same.