Jump to content

JustLikeIcarus

Members
  • Posts

    430
  • Joined

  • Last visited

Everything posted by JustLikeIcarus

  1. Actually better yet try. SELECT store,banner,store_city,store_postal, SUM(if(measurement = 'Quantity Total', latest_ytd, 0)), SUM(if(measurement = 'Quantity Total',yag_ytd, 0)), SUM(if(measurement = '$ Sales Total', latest_ytd, 0)), SUM(if(measurement = '$ Sales Total', yag_ytd, 0)) FROM table1 GROUP BY store;
  2. MySQL Workbench is pretty good and its free. As mentioned above TOAD is a pretty awesome app, I use it to administer Oracle which is their target audience ie TOAD = (Tool for Oracle Application Development). But their mysql version is pretty solid.
  3. Heres one way SELECT * FROM passwd INTO OUTFILE '/tmp/file.txt' FIELDS TERMINATED BY ' ' ENCLOSED BY '"' LINES TERMINATED BY '\r\n';
  4. How about this? SELECT store,banner,store_city,store_postal, SUM(t1.latest_ytd), SUM(t1.yag_ytd), SUM(t2.latest_ytd), SUM(t2.yag_ytd) FROM table1 t1, table1 t2 WHERE t1.store = t2.store AND t1.measurement = 'Quantity Total' AND t2.measurement = '$ Sales Total' GROUP BY t1.store;
  5. premiso is right. Your really making it more difficult on yourself than it it needs to be. @premiso All the times i've used ternarys ive formatted them as ($result_row['Priority'] == '15') ? " selected='selected'":null I notices you had the parens around the whole thing. Since ive never seen them done like that I was just curious if that was also a valid way? Just curious.
  6. Try it this way.. Also you can help yourself out alot by inserting alert()'s in places where you cant tell if something is firing right. making it alert to let you know it atleast got that far. Since you bound the event to something when it occurs "this" is the element that invoked it. $(e.target).find('.box').bind('keypress', function(e) { if(e.keyCode==13){ $(this).blur(); } });
  7. Ok heres a really quick example. would have been easier with your html but should work. $(document).ready(function(){ $('#results').click(function(e){ if($(e.target).is('td.editable')){ if($(e.target).hasClass('textarea')){ $(e.target).html('<textarea class="box">'+$(e.target).text()+'</textarea>'); }else{ $(e.target).html('<input type="text" class="box" value="'+$(e.target).text()+'" />'); } $(e.target).find('.box').keypress(function(k){ if(k.which == 13){ var data = $(this).val(); $(this).parent().text(data); /// save your data or whatever else. } }); } }); });
  8. if you want the key its foreach($array as $key => $value){ echo $key . ' ' . $value . '<br />'; }
  9. haha sweet. Glad to be of help.
  10. oh and input.inject($(this)).select(); is missing a )
  11. I notice your using an id as the selector for results. There is only one element with the id=results correct? As they can not be duplicated. I could throw together a version of what you want in jQuery if you think that would help.
  12. I just noticed that your while loop is not correct in the php code. try a loop more like this <?php if(!($db = @ mysql_connect('localhost', 'username', 'password'))) { print "Error: Could not connect to our database sorry for any inconvience.<br /> Please try at a later time."; } //select which database you want to edit mysql_select_db("edinburg_site"); $news_id=mysql_real_escape_string($_GET[news_id]); $query = "SELECT * FROM events ORDER BY event_id DESC LIMIT 4"; $result = mysql_query($query); //goes through all records in database and retrieves the need ones. ?> <div class='slideShow'> <div class='setTitle'><p>Special Events</p></div> <?php $i = 1; while($r=mysql_fetch_array($result)) { $news_id=$r["news_id"]; $title = $r["title"]; $fulldesc = $r["fulldesc"]; ?> <div id="slide<?php echo $i; ?>" class='slides'> <div class='slideTitle'><?php echo $title;?></div> <?php echo $fulldesc; ?> </div> <?php $i++; }//end while loop ?> <div class="controls"> <a href="javascript:previousPicture()" style="margin: 10px;"> Previous</a> <a href="javascript:nextPicture()" style="margin: 10px;">Next</a> </div> </div>
  13. OK found out that text-justify started as IE5 proprietary. It has been added to CSS3 spec but is not in use yet. So it basically is a no go.
  14. No but all of your types will be checked so they will
  15. try adding alert(current) directly after the if/else statement to see what it gets set to after hitting the last item.
  16. Also did you notice your missing an '=' for the "last" var.
  17. Your best option may be to delimit the necessary items in the options value like directories|path|name then parse that into a url when its submitted.
  18. Try formatting your ternary like (!isset($result_row[Priority]) ? " selected=selected" : NULL
  19. First I would remove the CDATA tags.
  20. I think you'll get better results with text-justify: newspaper; which is meant for the latin character set. distribute is more for Asian I believe.
  21. Im a jQuery man myself however I am sure its the same in MooTools that when using .each() the element is referenced via $(this). instead of an argument in the function.
  22. You really should do your best to avoid inline javascript. Unobtrusive javascript is the way to go.
  23. still I think your making this harder than it needs to be. I would suggest you give the form the correct action url, then set the value of the hidden elements when the others are modified. let the form submit occur normally. Does that make sense? I dont see any reason you need to specify the new location in a submit js function when you can just let the forms action do it.
  24. No thats not making a difference. I would move the onSubmit call since it belongs only to the form element. input elements dont have onSubmit so i believe it only works if in the form tag
  25. Oh Wait! your gonna need to add "return false;" to the js submit function or else it will submit to itself and the href change wont matter.
×
×
  • 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.