Jump to content

dietkinnie

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by dietkinnie

  1. Great this is exactly what i needed. Thanks !
  2. Hi All, Here is a better explanation: Menu Table structure id description parent_id 1 Soccer 0 2 England 1 3 Arsenal 2 4 United 2 5 Germany 1 6 Bayern 5 7 Italy 1 8 Milan 7 9 Palermo 7 10 Inter 7 11 Liverpool 2 I need a way to list the menu hierarchy when i only have the child available. For example if i have the description 'Milan' with parent_id 7, how can i go through all the parent ids to find the main parent which is soccer and display accordingly ? Soccer (parent_id = 0) >> Italy (parent_id = 1) >> Milan (parent_id = 7 ) Hope this explains what i need help with a bit clearer as i am completely lost. Thanks in advance. //DK
  3. Hi, This is what i would do. Hope this makes sens to you ? talents ( talent_id , talent_firstname, talent_lastname) -- 1 row movies (movie_id, movie_description, movie_year) -- 1 row castings (casting_id , talent_id , movie_id) -- multiple rows Regards, Rob.
  4. Hi, sorry for the vague reply. First off, I already have a horizontal left menu that is up and functioning correctly. However when i click on Milan i would like to include the "menu path" in the page i am redirected to. Football >> Europe >> Italy > Milan Something like this http://www.oddsportal.com/soccer/germany/bundesliga/. Soccer┬╗ Germany┬╗Bundesliga
  5. Hi Everyone, Can you please tell me what this type of menu is called ?? Football > Europe > Italy > Milan. Thanks .
  6. Hi Guys & Gals!! Hope you are all ok.... I need some help with the following I need to trim the following word as follows: $word = 'James Bond'; output would be 'James B' There is a space between all of the words I need to trim... Any suggestion?? Thanks in advance..
  7. Hi Everyone, I am stuck , and would like some inspiration I am trying this sql but not getting the correct result. case when max(price) and product_order = 1 then shelf_id end What i need is the shelf_id of the book with the highest price and has a product order of 1. p.S this is just a small part of the query.... I have really run out of ideas, so any tips would be greatly appreciated. Thanks in advance. //DK
  8. Hi joel24 and waynewex thanks for your replies , it was so simple, i was tearing my hair out over this. Problem solved now. Great stuff , thanks again guys !!
  9. i everyone, I have run into a problem and need your help. I am running a query and displaying the results into a table through php. This is a sample output. Date Cars 6/13/2009 6:30:00 PM Ferrari 6/13/2009 6:30:00 PM Subaru 6/13/2009 8:00:00 PM Toyota 6/13/2009 8:00:00 PM Opel 6/14/2009 5:00:00 PM Ford 6/14/2009 6:00:00 PM Hyundai 6/14/2009 6:00:00 PM Fiat 6/15/2009 9:00:00 PM BMW However i would now like to split and group the results up by date to something like this Date Cars Sum(cars) 6/13/2009 6:30:00 PM Ferrari 76 6/13/2009 6:30:00 PM Subaru 67 6/13/2009 8:00:00 PM Toyota 6 6/13/2009 8:00:00 PM Opel 98 --New Table 6/14/2009 5:00:00 PM Ford 65 6/14/2009 6:00:00 PM Hyundai 65 6/14/2009 6:00:00 PM Fiat 65 --New Table 6/15/2009 9:00:00 PM BMW 4 Any input would be greatly appreciated as i have run out of ideas ??? Thanks in advance!!
  10. Im not sure but it looks like the character "B" in ( 003602490B 012420755B 012454145B 012507387B ) Cannot be converted to Float as B is not a number ?? ???
  11. OK i have finally got the code working <?php include '/var/www/html/oddssurf/config.php'; $result = mysql_query("SELECT * FROM SLIDESHOW") or die(mysql_error()); $count = mysql_num_rows($result); //print_r($count); //check count of rows in table while ($row = mysql_fetch_array($result)) { echo "<div class=\"bigimg\" title=\"$row[title]\"id=\"$row[id]\"><img src=\"$row[imgsrc]\" class=\"change\"></div>\n"; } ?> Can anyone tell me if its possible to link the ID to a specific url? The output of the above code is: The output of the above code is <div class="bigimg" title="http://farm2.static.flickr.com/1429/1252247669_5f014e7dc1_b.jpg"id="Hihihihihihihihihihihihih"><img src="http://farm2.static.flickr.com/1429/1252247669_5f014e7dc1_b.jpg" class="change"></div> Now i would like to link "id = "Hihihihihihihihihihihihih" to www.example.com. Is this possible ? Thanks in advance !!
  12. Hi There, Try reading this post. http://www.phpfreaks.com/forums/index.php/topic,240251.msg1120398.html#msg1120398 In this example i used the spry menu which comes with dream weaver Hoe this helps. //DK
  13. Hi Everyone, My current slide show uses static data to display images. <div id="feature_gallery"> <div class="bigimg" title="http://farm2.static.flickr.com/1429/1252247669_5f014e7dc1_b.jpg" id="piknown printer took a galley of 1"> <img src="http://farm2.static.flickr.com/1429/1252247669_5f014e7dc1_b.jpg" class="change" ></div> <div class="bigimg" title="http://farm1.static.flickr.com/153/332584527_bd5efc0197_o.jpg" id="picLorem Ipstext of tnpsum hadu typa type spec"> <img src="http://farm1.static.flickr.com/153/332584527_bd5efc0197_o.jpg" class="change" ></div> <div id="output"></div> <a href="http://design-notes.info/tutorial/jquery-tutorial/how-to-creat-a-feature-article-slide-show-with-thumbnails-and-indicator/">Article</a> </div> I now need to insert that data into my db , loop the data an output it in the same syntax ax above , but am not sure how to to do so. Can anyone help me here , or point me in the correct direction ? Thanks in advance !! //DK
  14. Hi vicodin, Thanks for the reply. Any good news slidshow with caption or description you can recomend ? Regars, DK
  15. Hi , In config.inc.php Try using the mysql root login details to see if you can log in. $cfg['Servers'][$i]['controluser'] = 'root'; $cfg['Servers'][$i]['controlpass'] = 'rootpassword';
  16. Hi Everyone, I am currently searching for a mysql driven news sideshow i can publish on the front page of my site. But cant seem to fine one that meets my needs, and thought i might ask and someone here might know of one that is free or i could purchase and implement accordingly. Basic Drill down: 1: News description, and image location stored in mysql db. 2: News sideshow "Data taken from db" and display on the site front page. I was looking into the slideshow from frontpageslideshow which seems great but i dont have a CMS so from what i understand it cannot be installed. Any ideas/ pointers or info from past experiences would be greatly appreciated. Thanks in advance. //DK
  17. Manage to solve this one now. <?php // create build menu function function build_menu($data, $id=0, $pre=' '){ // for every bit of data, call it $row foreach ($data[$id] as $row){ // if $data[$row['menu_id']] exists... if (isset($data[$row['menu_id']])){ // then do this... // display hyperlink/s in a list echo "$pre<li><a class=\"MenuBarItemSubmenu\" href=\"$row[link]\">".$row[menu]."</a>\n"; // build the menu echo "$pre <ul>\n"; build_menu($data, $row['menu_id'], $pre.' '); echo "$pre </ul>\n$pre</li>\n"; // if $data[$row['menu_id']] doesn't exist... // just show the rest of the hyperlinks in a list } else echo "$pre<li><a href=\"$row[link]\">$row[menu]</a></li>\n"; } } // connect to database mysql_connect('localhost', 'root', '') or die(mysql_error()); // select the database mysql_select_db('test'); // select menu items from the `menus` table $res = mysql_query('SELECT * FROM menus') or die(mysql_error()); // pull table records until there is none and assign them to arrays while ($row = mysql_fetch_assoc($res)) $data[$row['parent_menu_id']][] = $row; //print_r($data); // build the multi layer menu echo '<ul id="MenuBar1" class="MenuBarVertical">',"\n"; build_menu($data); echo '</ul>'; ?> If the column added to the menu table was called 'link' then all i had to do was add $row[link] to the href statement.
  18. I think it should. input.php <html> <body> <form action="myform.php" method="post"> <p>Your Name: <input type="text" name="yourname" /><br /> </form> </body> </html> myform.php <html> <body> <?php $fname = $_POST['yourname']; $remove = preg_replace('/"/','',$fname); echo $remove; ?> </body> </html> If you run input.php and enter the text 'John"Brown" for example, the output would be 'John Brown'.
  19. Not sure if this is what you men but cant you use something like this ? $text = 'The food's good' $remove = preg_replace("/'/",'',$text); $remove would display : 'The foods good'
  20. Hi Everyone, Using the above example, how shall i proceed in adding links to the "nodes" of the menu so that when i click on "admin" i would get redirected to admin.php etc etc...? For example: menu_id menu parent_menu_id LINKS 1 Admin 0 admin.php 2 1st XI 0 1st.php 3 Fathoms 0 fathoms.php 4 Badgers 0 etc.php 5 Results 2 etc.php Thanks in advance! ???
  21. Hi, and where shall i put the php code?
  22. Hi Guys, Whisch is the best way to access this data ? <library id="40000003511"> <section>History</sectiont> <book id="9000001846" info="Italy" role="1">History of Rome</Participant> <book id="57" info="England" role="2">History of London</Participant> </library> As you can see there are two books but they both belong to library['id '] = 40000003511. Shall i use a foreach loop to access the book['id'] and book['info'] or is there another method is should use ? Thanks.
  23. Hi Guys, I am still stuck on this and was thinking. This is a print_f of $alt_odd SimpleXMLElement Object ( [@attributes] => Array ( [odds] => 1.50 [team] => 133702 ) [0] => 1 ) SimpleXMLElement Object ( [@attributes] => Array ( [odds] => 3.50 [team] => 133702 ) [0] => X ) SimpleXMLElement Object ( [@attributes] => Array ( [odds] => 5.95 [team] => 193111 ) [0] => 2 ) Is there any way i can get and compare the next values of the array something like this: if ($game_id == $game_id and $array_value != $array_next_value) { $i++; } Thanks
  24. Hi I'm not sure if this is what you were looking for but a quick search on Google directed me to this "ffmpeg-php".
×
×
  • 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.