Author |
Message |
Topic: problem with mysql query |
jpiercemaine
Replies: 1
Views: 4547
|
Forum: General Posted: Thu Sep 02, 2010 12:23 pm Subject: mysql query |
see your previous post |
Topic: Operand should contain 1 column(s) |
jpiercemaine
Replies: 1
Views: 5999
|
Forum: General Posted: Thu Sep 02, 2010 12:21 pm Subject: mysql query |
The query would be quicker if you did a join rather than a subselect:
function GetData($table1,$table2,$table3,$id) {
$sql = "SELECT h.id, h.title, h.head_type, h.head_code, ... |
Topic: Adding up values in a multidimensional array |
jpiercemaine
Replies: 5
Views: 8546
|
Forum: General Posted: Tue Aug 24, 2010 7:57 pm Subject: reply |
The following appears to give the correct total:
{foreach from=$obj->mItems item="item"}
{math assign="total" equation="x + y" x=$total|default ... |
Topic: Samrty and text area value |
jpiercemaine
Replies: 2
Views: 5050
|
Forum: General Posted: Thu Aug 19, 2010 12:28 pm Subject: hey |
If you are printing this out in html you can use the nl2br modifyer to convert all linebreaks to <br />, hope this helps:
example:
{$MyText|nl2br}
|
Topic: test if file exists |
jpiercemaine
Replies: 8
Views: 12832
|
Forum: General Posted: Thu Aug 19, 2010 12:19 pm Subject: a |
The if statements appear to be nested funny... then again i cant see entire code so.
Your code:
{if $dept eq "Maps"}{else}><a HREF="person_details.php?Id={$ID}&Dept={$dep ... |
Topic: test if file exists |
jpiercemaine
Replies: 8
Views: 12832
|
Forum: General Posted: Wed Aug 18, 2010 5:16 pm Subject: reply |
You could use the file_exists modifier to check to see if the file exists, just make sure you use the absolute path ie: _images/test.jpg no leading forward slash:
{if $id|cat:'.jpg'|file ... |
Topic: problem in loop in loop in smarty |
jpiercemaine
Replies: 2
Views: 5301
|
Forum: General Posted: Tue Aug 17, 2010 5:37 pm Subject: reply |
Based on your queries you do not have a unique identifier tying the news to the user in your array. I would recommend doing a LEFT JOIN on your sql query to return all news items and the user info wh ... |
Topic: comparing a number with an array item in smarty |
jpiercemaine
Replies: 1
Views: 4505
|
Forum: General Posted: Mon Aug 09, 2010 7:50 pm Subject: loops |
You need to assign a name to your section loop and use that when comparing the index or iteration in this case 'allseats':
{section start=1 loop=$seats+1 step=1 name=allseats}
... |
Topic: How to separate diffrent data in table? |
jpiercemaine
Replies: 1
Views: 4607
|
Forum: General Posted: Tue Jun 29, 2010 4:48 pm Subject: code |
Please provide some code so that you can be assisted. It depends on how your array and loops are setup. |
Topic: Adding a different class name with foreach |
jpiercemaine
Replies: 1
Views: 4437
|
Forum: General Posted: Fri Jun 18, 2010 8:52 pm Subject: a |
if you are just going to name them based on the iteration : 1,2,3,4,5,etc...
{* Extra Fields *}
{foreach from=$extrafields item=extras name=myextras}
<tr class="ex ... |
Topic: Subcategory problem |
jpiercemaine
Replies: 1
Views: 5159
|
Forum: General Posted: Thu Jun 17, 2010 12:35 pm Subject: hmmm |
Not sure exactly how your code works, but rather than try to include a WHERE clause could you use it in the IF statement?
{if $page_name == 'category' && $id_cat_bg->id_parent|int ... |
Topic: Problem with backround image and css |
jpiercemaine
Replies: 1
Views: 5038
|
Forum: General Posted: Mon Jun 14, 2010 12:14 pm Subject: couple of options |
Why not use the style inside the tag just for the background?
TPL:
<div id="contenu" style="background:url({$link->getCatImageLink($category->link_rewri ... |
Topic: how display value from array on tpl |
jpiercemaine
Replies: 2
Views: 11517
|
Forum: General Posted: Mon Jun 07, 2010 5:51 pm Subject: how display value from array on tpl |
have you passed (assigned) these values to the template? if so in the template use the foreach loop.
smarty:
{foreach from=$array key=k item=i}
<div id="{$i.user_id ... |
Topic: Align display next to each other? |
jpiercemaine
Replies: 2
Views: 5276
|
Forum: General Posted: Mon Jun 07, 2010 5:47 pm Subject: correct |
scuzzy is correct. you want to layout your templates accordingly. If you want a header template, you should also have a footer template. layout your 3 "body" templates in floating div's.
... |
Topic: template questin |
jpiercemaine
Replies: 6
Views: 8267
|
Forum: General Posted: Mon Jun 07, 2010 5:39 pm Subject: hmmm |
Okay, so obviously you will need to clean up the fields, where you did not provide them all. This is not tested, and am not sure if this is what you are looking for but...
PHP:
$sql = "SEL ... |
|