Jump to content

dreamwest

Members
  • Posts

    1,223
  • Joined

  • Last visited

    Never

Everything posted by dreamwest

  1. One more quick question: Is there an alternative for IN() using REGEX Currently i have: select * from video WHERE id IN(2,7,18,19)
  2. Cool! Its even a bit quicker than boolean Thanks
  3. my problem is ive got a list of rows that associate a video id select * from video where word_id IN(1,3) Which returns word_id vid_id 1 864144 3 864144 3 864145 1 864146 Basically from this set i only want to return rows that have both numbers in this case vid_id 864144, im just not sure how to go about it
  4. You mean like this http://www.wizecho.com/
  5. What is the fastest way to search a list of numbers without using LIKE Search = 4 Row eg, 2,3,4,6 Ive tried using REGEXP but not getting anywhere
  6. It always good to keep those in mind when doing a rewrite.
  7. Theres heaps you can do, for example if you just want to optimize the php code and not the site speed, search for "php code speed" . Youll find stuff like Slower: if($num !=''){ echo 'ok'; } Faster: if($num){ echo 'ok'; } Slower: print('ok'); Faster: echo 'ok'; etc..
  8. Very groovy baby - Thanks
  9. Whats the quickest way to find a word in a string and wrap <b> tags around it? $search = "php web"; $striing = "PHP is the web scripting language of choice"; Basically im looking for the output to be : "<b>PHP</b> is the <b>web</b> scripting language of choice"
  10. No im actually in Everton park in brisbane. I have another house in Laidley heights where its currently 2m underwater - good gob i had it overvalued for insurance sake
  11. My flooding day out.. http://www.findtail.com/Videos_Play/V_8DcQ3MRuQ/Rodeo_washing_down_West_Creek_into_the_Herries_St_bridge_during_the_Toowoomba_Floods&you=1 This is toowoomba Queensland with an elevation of 691 m (2,267 ft) Blackhawk choppers are flying overhead evacuating ppl as i type this.....fun!
  12. Well if you have a good startup idea im all in for venture capitalism. I put in all the money - you do all the work....I get 51% shares. Fair deal
  13. You should see some of the jobs on offer in melbourne, $80K + new laptop and you can "work" in the inside courtyard. Requirements: Smarty, php 3+ years exp, javascript, jquery, mysql, willingness to teach others - Just basic stuff
  14. Ok this i everthing relevant ajax.js function Data($Request, $Control, $jump, $player) { if($jump){ window.location = String(window.location).replace(/\#.*$/, "") + "#top"; } if($player){ document.getElementById("more").style.display = "block"; } if ($Control == "" || $Control == null) {alert ("No output specified !"); return;} var ai = new AJAXInteraction($Request, GetServerData, $Control ); ai.doGet(); } function GetServerData ($TheData, $Control){ document.getElementById($Control).innerHTML = $TheData; } function AJAXInteraction(url, callback, $Control) { var req = init(); req.onreadystatechange = processRequest; function init() { if (window.XMLHttpRequest) { return new XMLHttpRequest(); } else if (window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); } else {alert ("Your browser seems to be out of date, Please update!"); return; } } function processRequest () { if (req.readyState == 4) { if (req.status == 200) callback(req.responseText, $Control); } else callback(Myvar , $Control); } this.doGet = function() { req.open("GET", url, true); req.send(null); } } main.html <script src="/ajax.js"></script> <span onclick='Data("/page.html", "T"); return false;'>Click</span> <ul id='T'></ul> page.html <script src="/ajax.js"></script> <span onclick='Data("/test.html", "T"); return false;'>Click</span> test.html page.html has initiated this page So the javascrpt in page.html isnt getting initiated
  15. So ive called a page with ajax but the called page's javascript doesnt work, what am i missing?? main.html <script> function Data($Request, $Control, $jump, $player) { if($jump){ window.location = String(window.location).replace(/\#.*$/, "") + "#top"; } if($player){ document.getElementById("more").style.display = "block"; } if ($Control == "" || $Control == null) {alert ("No output specified !"); return;} var ai = new AJAXInteraction($Request, GetServerData, $Control ); ai.doGet(); } function GetServerData ($TheData, $Control){ document.getElementById($Control).innerHTML = $TheData; } function AJAXInteraction(url, callback, $Control) { var req = init(); req.onreadystatechange = processRequest; function init() { if (window.XMLHttpRequest) { return new XMLHttpRequest(); } else if (window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); } else {alert ("Your browser seems to be out of date, Please update!"); return; } } function processRequest () { if (req.readyState == 4) { if (req.status == 200) callback(req.responseText, $Control); } else callback(Myvar , $Control); } this.doGet = function() { req.open("GET", url, true); req.send(null); } } </script> <span onclick='Data("/page.html", "T"); return false;'>Click</span> <ul id='T'></ul> page.html <script src='/jquery_tools.js'></script> ..javascript stuff here
  16. My dad invented the "?" mark. An ive invented "CLS" ... Chronic Lateness Syndrome. Tell that to you boss next time you late - "But I have CLS!"
  17. culturemash will always be a better domain, but even thats too long. you should look at a domain with a max of 10 chars eg, pplmash.com or massculture.com . Its easier to remember - not to mention the resale value of a better domain. Trust me youll thank god you have a good domain name later on
  18. Its nice - simplicity & clean design is everything But youll regret using hyphens in your url , i made that mistake when i started
  19. This looks supa sweet! Bridge is broken.. no problem, just turn back time to when it was new
  20. Its actually $text = str_replace("\\n", "", $text ); or even better $text = preg_replace('!\s+!', ' ', $text);
  21. Im craving for some decent new scifi show to start....f*%$ck all this drama tv shit - lets get some imagination in the world happening
  22. Look down the bottom of this page for multi arrays http://www.wizecho.com/nav=php&s=array
×
×
  • 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.