Home     Articles & Projects     Products & Web Services     Forum

Forum

mysql inner join

Hi I am trying to inner join 6 tables, however it seems to not load when I run the sql, in PHPMyAdmin
It does not give me any error code.

SELECT
t1.id as id,
t1.stationid as search_stationid,
t1.artist as search_artistid,
t1.album as search_albumid,
t1.song as search_song,
t2.id as artistid,
t2.name as artistname,
t3.id as artid,
t3.art as artHTML,
t4.id as albumid,
t4.artist_id as match_artistid,
t4.art as match_artid,
t5.id as songid,
t5.song_title as songtitle,
t5.artist_id as song_artistid,
t5.album_id as song_albumid,
t5.songtime as songtime,
t6.radio_station_name as station_name,
t6.radio_station_high_stream as high_stream,
t6.radio_station_logo as logo,
t6.radio_stream_type_high as stream,
t6.type_high as type,
t6.radio_station_homepage as link
FROM tbl_search as t1
INNER JOIN tbl_radio_station as t6
ON t6.radio_station_id = t1.id
INNER JOIN tbl_search_artist as t2
ON t2.id = t1.artist
INNER JOIN tbl_search_album as t4
ON t4.id = t1.album
INNER JOIN tbl_search_albumart as t3
ON t3.id = t4.id
INNER JOIN tbl_search_song as t5
ON t5.id = t1.song
WHERE id = 1

javascript issue

Hi I am trying to do the following
when a users searches for a song it shows a list of songs from there search, each one is in a

  • like the following

    <script type="text/javascript">
    $(document).ready(function(){

    // Local copy of jQuery selectors, for performance.
    var jpPlayTime = $("#jplayer_play_time");
    var jpTotalTime = $("#jplayer_total_time");
    var jpStatus = $("#demo_status"); // For displaying information about jPlayer's status in the demo page

    $("#jquery_jplayer").jPlayer({
    ready: function () {
    this.element.jPlayer("setFile", "stream.php").jPlayer("play");
    demoInstanceInfo(this.element, $("#demo_info")); // This displays information about jPlayer's configuration in the demo page
    },
      swfPath: "Templates/js"

    })

    .jPlayer("onProgressChange", function(loadPercent, playedPercentRelative, playedPercentAbsolute, playedTime, totalTime) {
    jpPlayTime.text($.jPlayer.convertTime(playedTime));
    jpTotalTime.text($.jPlayer.convertTime(totalTime));

    demoStatusInfo(this.element, jpStatus); // This displays information about jPlayer's status in the demo page
    })
    .jPlayer("onSoundComplete", function() {
    this.element.jPlayer("play");
    });



    $("#menulink a").click(function() { //start function when any link is clicked

    var content_show = $(this).attr("title"); //retrieve title of link so we can compare with php file
    this.element.jPlayer("setFile", ""+content_show).jPlayer("play");

    }

    }); //close $.ajax(
    });
    </script>

    <div id="menulink" >
    <ul>
    <li><a href="#/Search/RadioOne" title="stream.php?id=828">Radio One</a></li>
    <ul>

    However it seems not to work I am wondering if anyone would be able to help

    thanks

  • Join two mysql tables together to get one image

    Hi I want to do the following.
    I have a gallery table that says each gallery like
    fruit
    meat
    veg

    in another table I have all the fruit, veg and meat pictures.

    What I want to do is when user clicks gallery it shows each gallery category but only one image from the category.

    Rand()

    Hi,

    I am using Order by Rand() on one of my listing sites to randomise the way the listings are appearing. The trouble is with Rand() is that if you click to view the next 10 listings it totally randomises them again.

    Is there a simple way to limit the number of times a record will display.

    Thanks

    Simon

    Having issuie printing each row. in array

    <?
    foreach($photos as $photo => $html)
    {
    print $html . "";
    }
    ?>

    What I am wanting to do, is show the html part of the array. $photos

    Contact Form

    Hi,

    I'm trying to create a contact form with the following :

    Name:
    Address:
    Date (DD/MM/YY):
    Time (24HR):
    Destination:
    Your Number:
    Your Email
    Notes:

    And if possible of a way to prevent of spam being spent by adding a captcha

    Does anyone how I can create it so it will post the above information entered will automatically sent to an email account?

    Thanks.

    Redirect user if they have already visited the site.

    Hi,

    Is it possible to create a piece of code which will get the users IP address and store it in a TXT file or on a database. If the user visits the page again the script will look at their IP address and if they have already visited the page before today then they will be redirect on a another page which will say an error.

    If you need any more information please ask.

    uploading images and populating a database with the URL

    Hi David,

    I have been building a form to allow a user to add information on to a database. As part of that form I would really like the user to be able to select an image from their computer and be able to upload it to a directory on the site. The image would be given a unique file name and copied to a folder on the website.

    When the form is submitted i’d like it so that the inserted record captures the URL of the uploaded file.

    I would really appreciate any pointers of how to do this.

    Many thanks

    Simon

    Not sure if I have done this right

    What I want to do is hide a modal if the modal is not needed.
    However with my PHP script I am using the following, what I know will happen. Is that the story will not sure if the modal is hidden, due to for e.g if modal 2 is hidden which $story[2] shows then story[2] will get skiped.

    Here is my code

    <?php
    if((isset($a)) && (!$a==""))
    {
       
    $sqlid = "select id from pages WHERE urltitle = '$t'";
       
    $resultid = mysql_query($sqlid) or die ("Error Searching");
       
    $rowid = mysql_fetch_assoc($resultid);
       
    extract ($rowid);
       
       
    $id=$id;
       
       
       
    $stories = array();
       
           
    $sql = "select * from items ORDER BY modNumb ASC LIMIT 7";
           
    $result = mysql_query($sql) or die ("Sorry we can't find that post");
       
            while (
    $row = mysql_fetch_assoc($result))
            {
           
    $i++;
           
               
           
    $stories[$i] = array('html'=>$row["HTML"]);
            }
    }
    elseif(
    $t=="" || $t=="index" )
    {

           
    $id=1;
       
           
    $stories = array();
       
           
    $sql = "select * from items ORDER BY modNumb ASC LIMIT 7";
           
    $result = mysql_query($sql) or die ("Sorry we can't find that post");
       
            while (
    $row = mysql_fetch_assoc($result))
            {
           
    $i++;
           
               
           
    $stories[$i] = array('html'=>$row["HTML"]);
            }
    }
    ?>

    my modals

    <!--- START OF MODUAL 1 --->
    <?
    if ($row["modNumb"] != 2)
    <div id="one">
    <?
    print $stories[1]['html'];
    ?>
    </div>
    <!--- END OF MODUAL 1 --->

    <!--- START OF MODUAL 2 --->
    <div id="two">
    <?
    print $stories[2]['html'];
    ?>
    </div>
    <!--- END OF MODUAL 2 --->
    </div>

    <!--- START OF MODUAL 3 --->
    <div id="three">
    <?
    print $stories[3]['html'];
    ?>
    </div>
    <!--- END OF MODUAL 3 --->

    <!--- START OF MODUAL 4 --->
    <div id="four">
    <?
    print $stories[4]['html'];
    ?>
    </div>
    <!--- END OF MODUAL 4 --->

    <!--- START OF MODUAL 5 --->
    <div id="five">
    <?
    print $stories[5]['html'];
    ?>
    </div>
    <!--- END OF MODUAL 5 --->

    <!--- START OF MODUAL 6 --->
    <div id="six">
    <?
    print $stories[6]['html'];
    ?>
    </div>
    <!--- END OF MODUAL 6 --->

    <!--- START OF MODUAL 7 --->
    <div id="seven">
    <?
    print $stories[7]['html'];
    ?>
    </div>
    <!--- END OF MODUAL 7 --->

    PHP pipe email to MySQL

    Hi,
    I am wondering if someone would be able to help me, I am having a big issue finding information and an example, of a PHP pipe email to MYSQL,

    I have made the email web interface, and all MYSQL tables etc, but I can't figure out who to pipe all emails to a PHP script.

    I would also like to know how would I allow users IMAP of their email account?

    Thanks
    Russell H.

    Syndicate content