Jump to content

jaymc

Members
  • Posts

    1,521
  • Joined

  • Last visited

    Never

Everything posted by jaymc

  1. This worked $exec = "cp -a $dir_to_read/$file/. $dir_to_read"; $output = exec($exec); Thanks to DarkWater for that one
  2. When using GROUP how can you get it to return the highest value in one of the affected rows for example, if there are 20 usernames in a table, for each row there is a time field of which are all different if we are doing GROUP BY username, how can I get it to pull out the highest time too At the moment I am unable to have any control of what time field it pulls out. I have tried using ORDER by and MAX() but it doesnt work
  3. i get an empty fields in my database. Where is the query in your code Just echo the $query out, after it been parsed not the actually code
  4. It just tells php where the variable starts/ends. In your case, you don't need them. But it saves you in this kind of a case: <?php $pet = 'dog'; print "I have 3 $pets"; //Doesn't work print "I have 3 {$pet}s"; //Works ?> I never knew that! very useful
  5. No one will look at that Paste your form code, and echo the $query so we can see what MYSQL is seeing
  6. Any more ideas?
  7. Nice idea, didnt work though Thought you had it then
  8. shell_exec("cp -a $dir_to_read/$file/. $dir_to_read"); //exec("cp -a $dir_to_read/$file/. $dir_to_read"); //system("cp -ap $dir_to_read/$file/. $dir_to_read"); //copy("$dir_to_read/$file/.", $dir_to_read); P.S - I have had commands like gunzip unrar etc working with exec just incase you think thats the issue
  9. Neither is working, also tried without the p and no joy
  10. No, but I just have and it did not work either
  11. Im trying to copy the entire contents of 1 folder to another, im using shell commands via php system or exec command, its not working though system("cp -ap $dir_to_read/$file/. $dir_to_read"); exec("cp -ap $dir_to_read/$file/. $dir_to_read"); That returns cp -ap 'BaseFolder/folder/.' 'BaseFolder' and if I copy and paste that straight into ssh it works fine, so its not the syntax or the variables All the folders in question are 777 etc etc, I have rights to use system command as its my server and I have enabled that Any ideas P.S - If there is another way to do it, please let me know My mission is to copy the contents of a folder via "." the dot, rather than read all the files etc. I have my reasons I tried copy("$dir_to_read/$file/.", $dir_to_read); but where I have $dir_to_read it also wants a new file name, so it wont work as there can be several files
  12. You would have to pull out the result from the database first though to do the php check Not very feasable unless you could use that function within mysql..?
  13. Your the boss Thanks for the advice
  14. Thanks for all that My guess was actually correct though, its as simple as this to remotely execute functions <div OnClick="parent.music.tester('elooooooo');">Click</div>
  15. Whats the best way to accurately yet loosely search in mysql, without falling over like below example # actual field data = I havnt got any without the apostrophy $string = "I havn't got any"; $q = "SELECT * FROM tablename WHERE fieldname LIKE '%$string%'" I would really like it to pick up anything thats close to that, may return rows where the field is any of these * I havnt got * havnt got any And also return the data sorted by closest match Hope someone can help
  16. Ah yeh I am I didnt realise TEXT field worked with INNODB Whats best to use then, TEXT or VARCHAR for 65k
  17. can text type be used with innodb I just need a field that can store 10,000 chars and work with innodb
  18. ok I think I understand I will handle the data inside the Ajax function itself and populate it accross rather than from within Doing that though I will have to mess about with swfobject so it places the flash in a div in another frame Thats the only way right or have I not understood your idea Your way it seems like I can execute a function in one frame from another, for example Window.theframe.swfobject(parameters )
  19. How do you think tables that have 200 million rows are dealt with
  20. Here <script type="text/javascript"> var fo = new FlashObject("magic_beans.swf", "movie", "88", "24", "7", ""); fo.addParam("allowScriptAccess", "sameDomain"); fo.addParam("quality", "high"); fo.addParam("FlashVars", "playlistfile=config/PlayData.php?id=198&configurationfile=config/configuration.xml"); fo.addParam("wmode", "transparent"); fo.write("flashPlayer"); </script> I click a link in FRAME 2, that sends a request to a page which returns the above javascript. AJAX must then place that script and execute it in FRAME 1 How can this be done, as the script above is pretty much being treated as plain text, even though it doesnt actually display in plain text Its not being parsed basically
  21. yeh I wonder how too Its marginal though mate, I had a table with 7.5 million rows in that was the most frequently accessed and updated table Still, queries including inserts updates and selects where instant The genious of the database I guess It does get a bit dirty as you go on though so always better to split mysql load or cluster I guess thats what the big dogs do Does anyone else have any input on this
  22. I have made my own. It works through ajax and PHP Its qiuite good. I will try get you it later if you like
  23. ok I think I may have confused you with the alert thing so I will just give the real reason The javascript actually contains swfovject code, you know that script to stop ie having the click to enable controls So my mission is to load a new flash movie into to div but it must be done via the parametres passed which of course is through javascript The problem is getting that javascript to execute which generates the flash movie. Dont forget its in another frame just invade thats a problem Thanks
×
×
  • 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.