Jump to content

jnymris

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

1 Neutral

About jnymris

  • Rank
    Newbie
  1. Firstly, Sorry about the lack of detail in the title, i'm not sure how to describe what i'm trying to achieve without going into detail. So I have a table: mysql> SELECT * FROM notes; +----+---------+-----------------+---------------------+----------+ | id | user_id | note | datetime | order_id | +----+---------+-----------------+---------------------+----------+ | 1 | 7 | Update Please? | 2018-02-16 22:22:18 | 1 | | 2 | 6 | Update Provided | 2018-02-16 22:25:18 | 1 | | 3 | 7 | test | 2018-02-1
  2. Hi, I am currently using a webbrowse from within vb.net and have been able to navigate to a website login successfully. I am now looking to be able to download a .tar.gz and specific where to save this file to. (In order to get access to the download you have to login to create a cookie hence why i have logged in) When attempting to load the page (http://mysite/admin/backup.tar.gz) this then returns a dialog box. I am looking to see if i cane save this file automatically and not prompt the user? Example code to populate the username section For Each element As HtmlElement In W
  3. JustSomeGuy pcntl_fork appears to require *nix?
  4. Thanks JustSomeGuy I'm not sure i'm understanding pnctl_fork 100% from the examples it appears to return back to the user who 'created' the fork? I'm wanting the system to run script 'without the users knowledge which might take up to 15 minutes to run' Quick example how i'd call c:/inetpub/wwwroot/backgroundtask.php to be run in the background and the user can continue to browse pages? Thanks! Johnny
  5. are the current websites using php? have you tried a simple phpinfo to see what it showing? is php installed? in IIS you know you need a handler for php right? <?phpphpinfo();?>
  6. Hello, I've come across the need to run a background task after a user has submitted a form. Which i am having problems running. the php script calling the backup task does not need to wait for the response from the task. When i run the following command from cmd from within windows it runs fine: "c:program files (x86)phpv5.3php.exe" c:/inetpub/wwwroot/backgroundtask.php > c:/inetpub/wwwroot/backgroundtask.log however when running: exec('"C:Program Files (x86)PHPv5.3php.exe" C:/inetpub/wwwroot/Honours/bgprocess.php > C:/inetpub/wwwroot/Honours/bgprocess.log'); It
  7. I have updated the code to be more readable. Regards
  8. I'm attempting to upload files using Ajax. With the following code it will upload the first file correctly (and return the ID of that file) After changing the file to another file it will upload the second file again fine however it also re-uploads the first file thus generating two copies of the file. it is like the data is appended. I have attempted to remove the if (formdata){formdata.append("images[]",file);} which does not resolve this i have printed the value of len and it is always set to one. no matter how many files are being uploaded. (this is the problem for FireFox, Chrome and IE.
  9. jnymris

    Soap

    Morning/Afternoon/Evening all I've been using SOAP for around 3 months without any issues. Recently it has came to light that these SOAP requests (Currently have one request which is being called on two separate pages). To try and debug this i have try the same website on my machine (Copying the source files and config)(using phpinfo) SOAP if enabled on both my machine and the server along with all the SOAP configs being the same. It runs successfully on my machine yet fails to run on the server. To investigate this further i then created a 'internal soap' which again works successfully on my
  10. jnymris

    MySQL If statement

    Thanks justsomeguy How would I go about creating a function and then calling the function? I've never created a function in MySQL. any suggestions/tutorials?
  11. jnymris

    MySQL If statement

    Morning/Afternoon All, I'm trying to create a simple if statement in SQLThis has been casuing me so much trouble since yesterdayHere's what i'm trying to achieve. IF((SELECT COUNT(*) FROM computers WHERE name='PC-01' AND domain='mydomain.local')==1)SELECT ComputerID FROM computers WHERE name='PC-01' AND domain='mydomain.local'ELSE IF((SELECT COUNT(*) FROM computers WHERE name='PC-01' AND domain='mydomain')==1)SELECT ComputerID FROM computers WHERE name='PC-01' AND domain='mydomain'ELSE IF(SELECT COUNT(*) FROM computers WHERE name='PC-01')==1)SELECT ComputerID FROM computers WHERE name='PC-01
  12. Scott, When to use the username and first name is totally down to you. When you log into W3school at the top you can see your full name. However i logged in with my username. But W3schools wish to display my first and second name to me rather than the username which they could have done. You could use a firstname, surname and password as a login action but of course more than one person exsist in the world with the same name and if they both have the same password what happens then? It's NOT Recommended but it's possible.
  13. Thanks JustSomeGuy (You've always helped on this board and i've been here for a 'while' you seem to be the most helpful person on this board that sticks around so Thank you for that aswell !I did managed to use this (the row_number function) just wondering which of the two would be best for performance/speed? SELECT * FROM (SELECT row_number() OVER ($sOrder) as rownum, * FROM $sTable $sWhere) as a WHERE a.rownum BETWEEN 10 AND 20 );
  14. EDITThanks Very Much i got this workingI was trying to create a new variable using: $result=usort($query,'sort_clients'); instead of using usort($query,'sort_clients'); Can i ask, Where does the $b come from cause we are onyl passing one variable through? Thanks So i've tried two ways to do the uSort i'm using a MCV design method so i tried: (This is all being done in the model because this is reference more than once and it always to be in alphabetical order. function get_clients_list(){ $portal = $this->load->database('clientportal', TRUE); $query = $portal->get('cplinktable')-&
  15. Solution function get_clients_list(){ $portal = $this->load->database('clientportal', TRUE); $query = $portal->get('cplinktable')->result(); foreach ($query as $client) $client->client_name=$this->get_username($client->autotaskid)->account_name; $result=usort($query,array($this,'sort_clients')); die(var_dump($result)); return $query; } function sort_clients($a,${ if($a->client_name > $b->client_name) return 1; else if ($a->client_name < $b->client_name)
×
×
  • Create New...