Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Spork52

    str_replace doesn't work when subject is array of arrays

    Thank you. Here's the actual code I used: $circuit_array[0] = array("ch1kwh","ch2kwh","aux1kwh","aux2kwh","aux3kwh","aux4kwh","aux5kwh"); $circuit_array[1] = array("ch1kwh","ch2kwh","aux1kwh","aux2kwh","aux3kwh","aux4kwh","aux5kwh"); foreach ($circuit_array as $value) {...
  2. Spork52

    str_replace doesn't work when subject is array of arrays

    Is str_replace supposed to work when the subject (haystack) is an array of arrays, not just a simple array? Here's an example: $old_array[0] = array("needle1","needle2","needle3"); $old_array[1] = array("needle4","needle5","needle6"); $new_array = str_replace("needle","pin", $old_array); echo...
  3. Spork52

    Is this secure? Serving content from two servers with SSL

    I am assuming that both servers are secure on their own. This is more of an SSL question, not specific to the server software. I included that information in case it makes a difference. The question is whether the shopping cart on Server 1 can somehow become vulnerable when the cart pages are...
  4. Spork52

    Is this secure? Serving content from two servers with SSL

    Is there any reason the following setup wouldn't be secure? Server 1: - Shopping cart system that accepts credit cards. - ASP, IIS, unknown database, SSL. - I have very little access to this server. Server 2: - Used to customize additional content for Server 1 (cannot be done on Server 1...
  5. Spork52

    PHP session vars time out after only a few minutes.

    Thank you for the extensive reply (I learned a lot), but I think you read my post so quickly that you didn't notice: The site is on a shared host (so I can't do some of the stuff you mention) The PHP version is 5.3.3-7.1+hw2 (what is hw2?) session_save_path is indeed set (/var/lib/php5) I...
  6. Spork52

    PHP session vars time out after only a few minutes.

    I have a PHP site on a shared host (PHP version: 5.3.3-7.1+hw2). The session variables (e.g.: $_SESSION["some_variable"]) usually time out too fast (under 5 minutes). On the local test server (PHP 5.4.10) there is no problem. The hosting tech support guys are no help. phphinfo (below) shows...
  7. Spork52

    convert string to short string and back again...

    After converting to hex, add leading zeros if you need exactly 10 digits.
  8. Spork52

    convert string to short string and back again...

    try hexdec and dechex functions,
  9. Spork52

    $$ variable variables not working with foreach loop

    Oops. Please ignore. Nothing wrong with code. Something else. How can I delete this post?
  10. Spork52

    $$ variable variables not working with foreach loop

    I'm trying to loop through an array of variable names to grab values from a form and assign the values to variables. It's not working--none of the form values get picked up. Here's what I've tried: $field_list = array("field1","field2",etc.) foreach ($field_list as $value) { $$value =...
  11. Spork52

    MySQL from remote server: Catastrophic Error

    Additional info: I tried connecting from a different host and got this error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [MySQL][ODBC 3.51 Driver]Client does not support authentication That host says they have version 3.51.16 of the ODBC driver installed and that it's...
  12. Spork52

    MySQL from remote server: Catastrophic Error

    My ASP website connects to a remote MySQL server like this: connectstring = "Driver={MySQL ODBC 3.51 Driver}; Server=myserverip; Port=3306; Database=mydbname; USER=myusername; PASSWORD=mypassword;" Set objConn = Server.CreateObject("ADODB.Connection") objConn.Open(connectstring) After...
  13. Spork52

    Implicit conversion varchar to money not allowed?

    Documentation for T-SQL says that the conversion from varchar to money is implicit (http://msdn.microsoft.com/en-us/library/ms187928.aspx see chart about 1/3 down the page). But, when I try inserting into a money column like this: sql = "INSERT INTO myTable (myMoney) VALUES ('" &...
  14. Spork52

    QUERY SPEED: IN vs. NOT IN

    Well, it took all of 70 seconds to update 212,000 records.
  15. Spork52

    QUERY SPEED: IN vs. NOT IN

    I guess this would be better: AND ( (table3.table4_id <> 1436 AND table3.table4_id <> 2477 AND table3.table4_id <> 6428 AND table3.table4_id <> 7241) OR table3.table4_id IS NULL )
  16. Spork52

    QUERY SPEED: IN vs. NOT IN

    Thanks, I didn't know aliases could be used in an UPDATE like that. And thanks for the "sargable" article. Great word. Yes, it has to be LEFT JOIN on table3. I don't understand what you mean by the WHERE clause turning the LEFT JOIN on table3 into an INNER JOIN. Also, don't see why it should...
  17. Spork52

    QUERY SPEED: IN vs. NOT IN

    I've got to update records in a table containing about 210,000 records and I'm curious if different versions of the query will make much difference in the time it takes to execute. Specifically, is it better to use IN with a subquery that returns a large recordset or NOT IN with a subquery...
  18. Spork52

    http to https post form data

    It's not secure. See: http://www.sciencedaily.com/releases/2008/07/080722175802.htm "Placing secure login boxes on insecure pages: A full 47 percent of banks were guilty of this. A hacker could reroute data entered in the boxes or create a spoof copy of the page to harvest information. In a...
  19. Spork52

    CSS Menu: Need link to work when over &lt;li&gt;, not just text

    Finally: #leftnav a:first-letter { text-transform: capitalize; } instead of #leftnav ul ul li a:first-letter { text-transform: capitalize; } did the trick.
  20. Spork52

    CSS Menu: Need link to work when over &lt;li&gt;, not just text

    Well, I celebrated too soon. All kinds of weird things happened, so I started over and ended up with something that works everywhere except for IE6, in which the rollover only affects the first letter. I figure I'll use some conditional comments to fix that. <html> <head> <style...

Part and Inventory Search

Back
Top