Jump to content

kvnirvana

Members
  • Posts

    165
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kvnirvana's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. It works Thank you so much
  2. I write it in php and html. I did not write that specific code, somebody told me this was the way to write it, and it seems to work.
  3. The syntax is from when the user chooses a person from a drop down they get to the page where that code is from. If the chosen persons title is 'german' and the name is James it would say 'German James | Sea.com' but I want it to say 'Visit German James | Sea.com'
  4. I've got this code <{assign var="title" value=$people->getTitle()|cat:" "|cat:$people->getName()|cat:" | Sea.com"}> How do I write some text fx. 'visit' in the beginning of the title value? Tried to do it like this <{assign var="title" value=Visit $people->getTitle()|cat:" "|cat:$people->getName()|cat:" | Sea.com"}> But then I get an error. Any help mych appriciated
  5. Thank you so much
  6. I need to add ORDER BY name ASC to this code foreach($db->query("SELECT * FROM company_subcategory WHERE category_id = ".(int) $category_id) as $row) { $r[] = new CompanySubCategory($row['subcategory_id'], $row);} Tried to do it like this, but it doesn't work foreach($db->query("SELECT * FROM company_subcategory WHERE category_id = ".(int) $category_id ORDER BY name ASC) as $row) { $r[] = new CompanySubCategory($row['subcategory_id'], $row);} Any help much appreciated Thanks in advance
  7. No, I'll try that, thanks for the link :-)
  8. I don't think I can use the spacify because I don't want to insert a space between every character, I only want a space between what the variable $people->getShow() outputs and what the variable $people->getName() outputs
  9. Yes it's SMARTY None of the suggestions worked. I tried jamesxg1 suggestion like this <{assign var="title" value=$people->getShow() | cat:$people->getName()|escape}> And I tried Adams suggestion like this <{assign var="title" value={$people->getShow()|escape} {$people->getTitle()|escape}> Both of them gave me an intern 500 error
  10. It works :-) but how can I get a space between getShow and getName? Tried to do it like this but again I get an error <{assign var="title" value=$people->getShow()| cat:$people->getName()|escape}>
  11. On one of my pages I set the title like this <{assign var="title" value=$people->getShow()|escape}> The problem is I want the title to say getShow and getName Tried to do it like this but I get an internal 500 error <{assign var="title" value=$people->getShow()|escape}$people->getName()|escape}> How can I make this work? Thanks in advance
  12. I've got this star rating script, showing 5 stars. How do I get hover text on the stars so if I have mouseover on the first star it says 'bad' and if I have mouseover on the last star it says 'very good' ? <script type="text/javascript"> $(document).ready(function() { var star_on = new Image(); star_on.src = "<{$baseurl}>/design/img/star_on.png"; var star_off = new Image(); star_off.src = "<{$baseurl}>/design/img/star_off.png"; $("img.star").hover(function() { var star = $(this); var value = star.attr('x:value'); for(var i=1; i<=5; i++) { if (i <= value) { $(".star" + i + ".area_" + star.attr('x:area_id')).attr("src", star_on.src); } else { $(".star" + i + ".area_" + star.attr('x:area_id')).attr("src", star_off.src); } } }, function() { var star = $(this); var value = $("#area_" + star.attr('x:area_id')).val(); var area_id = star.attr('x:area_id'); for(var i=1; i<=5; i++) { if (i <= value) { $(".star" + i + ".area_" + area_id).attr("src", star_on.src); } else { $(".star" + i + ".area_" + area_id).attr("src", star_off.src); } } }); $("img.star").click(function() { var star = $(this); $("#area_" + star.attr('x:area_id')).val(star.attr('x:value')); }); $("#folder").click(function() { $(".foldable").toggle(); } ); }); </script> Thanks in advange
  13. foreach($db->query("SELECT * FROM company_people WHERE company_id = ".(int) $company_id) as $row) { $r[] = new People($row['people_id'], $row); I want to make this query order by name, how should I do that, can't figure it out Thanks in advance
  14. Thank you :=)
  15. How can I write a mysql command when I want to get data from 2 tables. On one of my pages Iv'e got a search field where the user can write a word an then I want it to search at least 2 tables and return the rows where the word searched for appears? Tried to do it with union but the problem is that it only works if it is the same number of rows. So I got this table called fag_muscles id Latin Description 1 Piriformis Muscle in your butt And this table called fag_bones id Latin Description 1 Pelvis Bla bla bla 2 Peronius Bla bla bla If the user searches for the letter 'P' It should return Piriformis Pelvis Peronius
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.