![]() |
Newbie question..
I'm rather embarrased to post this, but hey - we all have to start somewhere..
I've tried to integrate some options in to the admincp, but in the code where I want them to take effect, it causes a MySQL error.. I dare say there are certain rules to comply with in SQL queries - I'm still learning things.. Anyway, one of the created variables are $vboptions['journals_recentdisplaylimit'] In this example, I wanted to apply it to this piece of code: Code:
$journal_recent_entries = $DB_site->query("SELECT j.enabled, u.username, e.journalid, e.title, e.entry, e.mood, e.np, e.timestamp, e.userid Code:
$journal_recent_entries = $DB_site->query("SELECT j.enabled, u.username, e.journalid, e.title, e.entry, e.mood, e.np, e.timestamp, e.userid Quote:
I figured I'd try and get around this by applying it to a second variable, so tried this: Code:
$recentdisplaylimit = $vboptions['journals_recentdisplaylimit']; Code:
$journal_recent_entries = $DB_site->query("SELECT j.enabled, u.username, e.journalid, e.title, e.entry, e.mood, e.np, e.timestamp, e.userid Quote:
Oh - and if the SQL query is messy, don't blame me.. I didn't write it.! |
$recentdisplaylimit isn't being set so that's why you are receiving a SQL error. You need to make sure that variable has a value.
|
$recentdisplaylimit = $vboptions['journals_recentdisplaylimit'];
If $vboptions['journals_recentdisplaylimit'] is set as 10 in the admin cp, doesn't $recentdisplaylimit become 10? |
According to the query it's not. I'm not sure why it would do that.
|
Bleh.. How annoying.. :tired:
|
What do you get when you echo $vboptions['journals_recentdisplaylimit'] ?
|
Sadly, nothing.. Nothing get's printed.
I used echo $vboptions['journals_recentdisplaylimit']; |
the t-string error could've been fixed by doing this
PHP Code:
|
Quote:
However, I wasn't sure if that would work in the first place or not. Now I know it would.. =) $vboptions['journals_recentdisplaylimit'] doesn't seem to be pulling the value from the database when used in the journal.php file though.. Is there something else I need to add to get it to work? |
Quote:
|
All times are GMT. The time now is 12:06 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|