JustLikeIcarus
Members-
Posts
430 -
Joined
-
Last visited
Everything posted by JustLikeIcarus
-
relatively advanced SQL statment help please??!! :P
JustLikeIcarus replied to alphanumetrix's topic in MySQL Help
Could you give an example of how the end result should look. The query I posted would output something like series A, 12/30/2009, 3 series A, 12/29/2009, 10 etc... I guess im just confused on what your end result should look like. -
It looks like you may have somehow changed you mysql port. take a look at the mysql config and see what port it is listening on.
-
This really isnt the best way to perform what you are wanting. Since the products belong to different sites they should at the very least be seperated logically (google virtual private databases) You want to avoid accidently giving one site access to anothers products. You could do something like provide a "feed" from the server with the actual database which the end server reads in to get its list of products. Each site would access a feed of only its data. Think of how rss feeds work. This would eliminate the need to have a remote server querying your database.
-
This is a common issue when laying out tables this way. Since your joining a table with a result that only has one record per city you are only going to get back one record per city. The fix would be one of a few options. One soltion would return all three hotels in each row returned. SELECT city.city_id, city.city_name, hotel1.hotel_name, hotel1.hotel_address, hotel2.hotel_name, hotel2.hotel_address, hotel3.hotel_name, hotel3.hotel_address FROM city, hotel hotel1, hotel hotel2, hotel hotel3 where hotel1.hotel_id = city.city_hotel_1 and hotel2.hotel_id = city.city_hotel_2 and hotel3.hotel_id = city.city_hotel_3
-
You have to get a little creative for this. Oracle offers it as "rownum" but sadly mysql does not yet have it but can be accomplished like select @rownum:=@rownum+1 AS week, col, col, col from your_table, (SELECT @rownum:=0) r This would output 0 val val val 1 val val val 2 val val val etc......
-
OK looks like that should work providing you replace the 5 with the actual number of stars you want
-
relatively advanced SQL statment help please??!! :P
JustLikeIcarus replied to alphanumetrix's topic in MySQL Help
The following should return the series col, date col and the highest placement for eachset of series, date. Is that what your wanting? select series, date, max(placement) from links group by series, date order by series, date -
Cant you just change the echo statement to output the image? like echo '<img src="your star image" />';
-
jquery apply hover effect to all instances of a class
JustLikeIcarus replied to ldb358's topic in Javascript Help
what if you dont include the effects.js file? does the test alert work then? -
jquery apply hover effect to all instances of a class
JustLikeIcarus replied to ldb358's topic in Javascript Help
Sounds like jquery either isnt loading or is in conflict with another framework. what all js are you loading on the page? can you post the html header or the whole doc? -
jquery apply hover effect to all instances of a class
JustLikeIcarus replied to ldb358's topic in Javascript Help
Replace it with this just to see if its getting triggered. I would also use firefox with firebug installed to check for errors. <script type="text/javascript"> $(document).ready(function(){ alert('test'); }); </script> -
jquery apply hover effect to all instances of a class
JustLikeIcarus replied to ldb358's topic in Javascript Help
So this is in the head of your document correct? <script type="text/javascript"> $(document).ready(function(){ $(".video").hover(function(){ },function(){ }); }); </script> -
Need to add "return false" to the js function to keep the form from submitting to itself. Like: function WrestlerList() { var addWrestler = document.getElementById("character_selection").value if (addWrestler) { document.getElementById("chars").value += addWrestler+","; var li = document.createElement('li'); li.innerHTML = addWrestler; document.getElementById("characterlist").appendChild(li); } return false; }
-
What happens if you change your else section to this? If it still doesnt work could you post all the html/js for the page. } else { var url = $(this).attr("href"); $("#accordion").load(url).accordion({ active: 0, header:'h2.Blog' }); }
-
I removed "emptyOption: true" from your code and it worked fine for me.
-
Selecting the same value twice using different AS clauses
JustLikeIcarus replied to Jibberish's topic in MySQL Help
Yeah what you want to do is pull in the users table twice using aliases. I dont know your tables/columns but an example would be select id, t1.username as start_name, t2.username as end_name from fields, users t1, users t2 where t1.user_id = fields.user_id_start and t2.user_id = fields.user_id_end -
Looks like one problem is that your "options" has preselectFirst twice, I believe the second one should be preselectSecond.
-
It looks like you need to do a little reading on html and css. Take a look at the differences in the id attribute and the class attribute for html elements as well. A good place for learning more about css is http://www.w3schools.com/css/default.asp they have a section for html as well. I think that you'll be able to answer a lot of your questions by just taking an hour or two reading though the sites examples. If after you do this you still are not sure how to do what your asking, let us know.
-
Ok, if when using the code i sent the border and background are showing around the title then you have something overriding the css i sent which which moved that off of welcome_content to just content.
-
One way is to give the table cell a class like <th class="red-text"> then in the css do .red-text { color: #ff0000; } then whatever is in that cell will be red.
-
My Ajax Works on IE but doesnt on FF, Chrome, Safari - HELP
JustLikeIcarus replied to iPixel's topic in Javascript Help
You should just be able to append data into the select box. I dont think the having the div in there is valid. Should be able to just do .append(data) also the get request before had ../ before it and now you dont have it. -
This displayed fine for me. .tab1 { width:100px; float: left; margin:0 20px 0 0; padding: 0; border-collapse:collapse; border: 1px solid #000; } .tab1 th, .tab1 td { border: 1px solid #000; } <table class="tab1"> <thead> <tr><th>Number</th><th>Items</th></tr> </thead> <tbody> <tr><td>90</td><td>$5.00</td></tr> <tr><td>Total</td><td>$5.00</td></tr> </tbody> </table> <table class="tab1"> <thead> <tr><th>Number</th><th>Items</th></tr> </thead> <tbody> <tr><td>90</td><td>$5.00</td></tr> <tr><td>Total</td><td>$5.00</td></tr> </tbody> </table>
-
First, you cant have multiple items with the same id. if you want to style those 2 tables with "tab1" then change it to class="tab1" and the css to .tab1 { width:100px; float: left; margin:0 0 20px 0; padding: 0; border-collapse:collapse; border: 1px solid #000; } .tab1 th, .tab1 td { border: 1px solid #000; }
-
My Ajax Works on IE but doesnt on FF, Chrome, Safari - HELP
JustLikeIcarus replied to iPixel's topic in Javascript Help
Try adding the select box to the regular form and have your script only send back the options. like <select name='form_departmentid' id='form_departmentid' class='login_txt_box'> </select> then js would be <script type="text/javascript"> $(document).ready(function(){ $('#form_branch').change(function(){ var randomnumber=Math.floor(Math.random()*11) var value = $(this).val(); $.get('../DepDropDown.php', {q: value, rand: randomnumber}, function(data){ $('#form_departmentid').append(data); }) ; }); }); </script> -
Give them an id attribute like <table id="tab1"> the in the css you do #tab1{ }