Jump to content

brianlange

Members
  • Posts

    243
  • Joined

  • Last visited

Everything posted by brianlange

  1. If you do a header(Location: your-html-page.php) you should be able to avoid the duplicate insert on refresh. Or if you have unique values being inserted you could do a select statement before you do the insert.
  2. Our company recently changed servers. There is php code to download a file via ssh using the ssh2_scp_recv function. This no longer works since we migrated servers. The scp function does work. Is there a config setting that can fix this issue. I saw a work around mentioned on php.net but I would rather just to have ssh2_scp_recv working. Thanks.
  3. will the php function ftp_connect encrypt the handshake when provided with a ftps url or will only the data transfer be encrypted?
  4. I am new to Toad and relatively new to Oracle. I have recently received access to use Session Browser in Toad. Can someone point me in the right direction on how to effectively use this tool. For instance, how to find long running queries, find bad explain plans etc.
  5. Thanks for the great responses. The form accepts html and then parses the links that are entered into a new form. There are multiple individual checkboxes (not arrays) associated with each link so if there are a couple hundred links this leads to 1k+ plus form elements.
  6. Thanks. So it sounds like increasing the limit to 5k or so is probably ok. Yes, the form should be redesigned but this is not an option at the moment.
  7. By default max_input_vars is set to 1000 (5.3). This can cause issues if a form has more than a thousand input values or a post array has more than 1k elements. Increasing the limit is said to be a security risk. Is the risk minimal? Can you raise the limit with minimal risk involved?
  8. Should PHP warnings cause http 500 errors? I was under the impression that only a fatal error would cause a 500 error? I am troubleshooting a max_input_vars warning that may be the cause of a 500 error.
  9. I'm also aware that I can write update table set col1 = val, col2 = val where id = :id I was just curious if I can avoid repeating the value.
  10. In Oracle, how do I update several columns to one value? This will work, but I am guessing there is a better way. Update table set (col1, col2, col3) = (select val, val, val from dual) where record_id = :record: id
  11. Does it matter if you pass in more bind variables than are present in the sql statement? Does it depend on the version of oracle or how it is configured?
  12. I have a complicated php page with javascript. It was having issue loading. I moved the body onload to window.onload and the page is working better. My boss seems to think this should be irrelevant but after 20 tests it appears to make a difference. Has anyone had a similar issue? I know I am being vague and I cannot post code, I was just looking for comments on issues with using the onload body property.
  13. I don't think that is going to work. I only want the records where the min(start_time) for records grouped by message_id has a status value of 'PC' I was able to get a result with the following. Is there a better way to do this? select message_id from table where start_time in (select min(start_time) from table group by message_id) and status = 'PC'
  14. My Oracle table columns are: message_id, status, start_time There is no primary key. There are multiple rows for each message_id. I would like to be able to select records where the record that has the mininum start_time value for records grouped by message_id has a status value of 'PC' Thanks!
  15. Here's my text: %%match1%% some text %% match2 %% some more text %%match3%% I want to write an expression like /%%[\w]+%%/ but this will result in a match for %% some text %% I want to to ignore an character from the previous match. thanks in advance.
  16. I thought external tables were unique to the session like gtt tables but this is not the case.
  17. When trying to create a oracle external table from within a php script i get the the error "OCI_ERROR: ORA-00955: name is already used by an existing object" This error appears despite changing the name of the table to something that definitely does not exist. Thanks, Brian
  18. I have a php script that creates a flat file that I would like to load into a Oracle table. I've looked at Oracle bulk loader, but I don't think I can run this within my php script, is this correct? What is the best way to go about this? Thanks, -Brain
  19. When I subtract a timestamp value from a date value I am getting something like "-00 00:05:04.312167" How do I convert this to a more readable format so the the leading zeroes are removed and nothing is displayed beyond the seconds value? I am googling at the moment...not being lazy Thanks, Brian
  20. Does Oracles CONNECT BY work by issuing a loop? I am trying to understanding the following query SELECT TRIM(SUBSTR(txt, INSTR(txt, ',', 1, level) + 1, INSTR(txt, ',', 1, level+1) - INSTR(txt, ',', 1, level) -1)) as token, level FROM (SELECT ','||:arg1||',' txt FROM dual) CONNECT BY <= length(:arg1) - length(replace(:arg1,',',''))+1 ) If arg1 is a comma delimited list there will be returned a record set with the number of records equal to the items in the command delimited list. Can someone explain in simple terms what connect by does?
  21. Thanks. I can connect to our oracle dev server with the script so I think apache has the necessary permissions. I'm trying to now connect to the production database server. This requires a local tnsnames.ora file however I can't tell if the script is even trying to use this file. It's in the same directory as the php script so I assume it is.
  22. thanks for the response. Can you tell me what this means?
  23. I have created a tnsnames.ora file in my local directory however I am not sure it is being used. I have also add the variables tns_admin to .bash_profile When I try to run the php script I get ORA-12154: TNS:could not resolve the connect identifier specified How should I go about troubleshooting this? If I modify value for TNS_ADMIN to a path that doesn't exist the 12154 error does not change. Does this mean it is not reading the .bash_profile file and my local copy of tnsnames.ora? Thanks, -Brian
  24. I need a regular expression that will remove all span tags that have a font-family css declaration. <span style="font-family: Times New Roman;"> I could probably write this but I need to know how to also remove the closing </span> tag. Thanks, Brian
×
×
  • 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.