Jump to content

Debbie-Leigh

Members
  • Posts

    38
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://Quick-Computer-Solutions.com

Profile Information

  • Gender
    Not Telling
  • Location
    Bristol, England

Debbie-Leigh's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi, I'm trying to extract start and end dates as the delimiters of different periods. I would like them to be on the same row, but I can't figure out how to do it. The query I'm using is: -- This select gets the start and end dates, but on different rows SELECT date AS start_date , date_sub(date, interval 1 second) AS end_date FROM log WHERE date(date) >= '2013-06-10 00:00:00' AND date(date) < '2013-06-16 23:59:59' AND type in (1,2,3) GROUP BY date(date), type UNION -- This next one gets the end date for the last date in the period SELECT date_sub(date, interval 1 second) AS end_date , date from ( SELECT date FROM log WHERE date(date) > '2013-06-16 23:59:59' AND type IN (1,2,3) GROUP BY date(date), type LIMIT 1 ) AS next_one ORDER BY start_date An example of the data I'm working with is: date type 2013-06-06 13:05:44 1 2013-06-13 15:34:45 2 2013-06-13 15:31:08 1 2013-06-20 13:10:32 1 2013-06-27 14:05:16 1 2013-07-04 13:58:14 1 The result I'm currently getting is: start_date end_date 2013-06-13 15:31:08 2013-06-13 15:31:07 2013-06-13 15:34:45 2013-06-13 15:34:44 2013-06-20 13:10:31 2013-06-20 13:10:32 So now the end date for row 1 is in row 2 and the one for row 2 is in row 3 etc. Does anyone know of a technique to get the end date in row 2 to appear in row 1 i.e. against the one it relates to? Debbie
  2. Hi, Has anyone else run foul of the IP loopback restriction rule that shared server hosting companies seem to have been implementing? I've been told by my hosting company that it's to stop programming loops from occurring, but IMHO, there are far more common ways to create coding loops etc. that could slow a server down than calling a program on another website on the same server, which then calls back to the same program on the originating website. It seems to me that this one rule can end up preventing a lot of quite legitimate web programming from happening, unnecessarily. For example, you may want to park a domain on a sub-domain, which could then call a module on the main domain to retrieve some database info for display, which you would quite legitimately need to use the main domain's full url for, instead of either a relative url or a full path url - not with this rule. Or you might provide a service that other websites (which could be owned by you or other people) could call from code to retrieve information to display on their pages. With the loopback rule in place, if any of the calling websites reside on the same web server as the called website, which is entirely possible with the larger hosting companies, then this won't be allowed either. Of course, with enough thought, work arounds can always be found, but it just seems to me that this is an unnecessary rule too far. Does anyone know how this rule came into being (e.g. was it a theoretical problem dreamt up by an academician or a real problem experienced by a hosting company) and why the hosting companies seem to be so fixated on it, when, IMHO, it is a rule that can cause far more problems than it solves? Debbie
  3. Hi, At long last, I've managed to figure out how to emulate the HTML cellspacing attribute in CSS. So I thought that I'd post it here so everyone can use it. Here's the code: .cellspacing td { border-right : 3px solid #FFF; } .cellspacing td:last-child { border-right : 0px; } .cellspacing th { border-right : 3px solid #FFF; } .cellspacing th:last-child { border-right : 0px; } Just add the cellspacing class to a table tag and it creates a white 3px border between each column throughout the table. It's a shame the CSS designers haven't made this easier by having a proper built-in cellspacing attribute, but until they do, this is the next best thing, I guess. Enjoy. Debbie
  4. Yes, agreed. It does work. Hmmm, I guess I have a bunch more debugging ahead of me. Trouble is, I've run out of ideas. Oh well, onwards and upwards. Thanks for the help, anyway.
  5. Hi, I'm trying to get top both corners of my table header row to have a rounded corner each, but only one is appearing. The HTML is: <tr> <td width="12%" class="tbl-col cnr-tl">Col 1</td> <td width="20%" class="tbl-col">Col 2</td> <td width="20%" class="tbl-col">Col 3</td> <td width="30%" class="tbl-col">Col 4</td> <td width="12%" class="tbl-col cnr-tr">Col 5</td> </tr> and the css is: .tbl-col { background-color : #FFDA99; color : #C00000; font-size : 15px; font-style : italic; font-weight : bold; height : 25px; text-align : center; } .cnr-tl { border-top-left-radius : 10px; -moz-border-radius-topleft : 10px; -webkit-border-top-left-radius : 10px; } .cnr-tr { border-top-right-radius : 10px; -moz-border-radius-topright : 10px; -webkit-border-top-right-radius : 10px; } When the styles are in this order, the right hand column has a rounded corner, but if you swap the order of .cnr-tl and .cnr-tr, the left hand column has a rounded corner, but I can't get both end columns to have rounded corners at the same time. Putting both corner styles on one column does work, though, but I'd like to have both end columns to have rounded corners and the middle columns to have straight corners. Does anyone know how to do this? Debbie
  6. Hi, I'm trying to include some text within a div, but the last line always seems to fall outside the bottom border. An image of what it looks like is attached. Here's the html I'm using: <div class="tbl-row <?php echo ($intRow % 2 == 0) ? ("tbl-row-odd") : ("tbl-row-even"); ?>"> <div class="title-lbl">Site: </div> <div class="title-text"><?php echo $aCols["site_name"]; ?></div> <img src="{ImgSpacer}" alt="" width="1" height="20" /><br /> <div class="contents-text"><?php echo nl2br($aCols["contents"]); ?></div> <div> <span class="subon-text"><?php echo $aCols["local_time"]; ?></span> <span class="subon-lbl"> at: </span> <span class="subon-text"><?php echo $aCols["local_date"]; ?></span> <span class="subon-lbl"> on: </span> <span class="subby-text"><?php echo $aCols["full_name"]; ?></span> <span class="subby-lbl">Submitted by: </span> </div> </div> and here's the css: .contents-text { color : #F98537; font-size : 15px; text-align : left; } .tbl-row { border-radius : 15px; -moz-border-radius : 15px; -webkit-border-radius : 15px; margin-left : auto; margin-right : auto; padding : 8px; vertical-align : top; width : 96%; } .tbl-row-even { background-color : #FFEBCB; } .tbl-row-odd { background-color : transparent; } .subby-lbl { color : #F98537; display : inline; float : right; font-size : 15px; vertical-align : top; } .subby-text { color : #F0F; display : inline; float : right; font-size : 15px; vertical-align : top; } .subon-lbl { color : #F98537; display : inline; float : right; font-size : 15px; vertical-align : top; } .subon-text { color : #F0F; display : inline; float : right; font-size : 14px; vertical-align : top; } After much testing, I've found that it's the floats that seem to be causing the problem. When I take them out, the row is included within the outside div, but when I put them back in, the row falls outside. I need to keep the floats, because I would like to have the "Submitted" row aligned to the right, unless there's another way to achieve the same effect. So, does anyone know how I can have the last row right-aligned and included within the surrounding div? Debbie [attachment deleted by admin]
  7. Hi, I have an ajax script that I would like to use to retrieve a password hint from a database. Both the ajax script and the php retrieval script are stored on the same domain (we'll call it domain1.com), but the ajax script runs on another domain (domain2.com). All the scripts are working fine, individually, but when I try to integrate them, I'm getting a ready state of 4, but an HTTP status of 0. I've traced the code flow and the retrieval script is being called by the ajax script OK and it's echoing all the right stuff, but it's just not getting back to calling ajax routine. I've read that an ajax routine can only call a script that resides on the same domain that it runs on. Is this correct and, if so, does anyone know of a work around, because I really need to be able to store the ajax script on domain1 and run it on domain2? If not, then can anyone suggest why I'm getting an HTTP status of 0, when all the individual components are working fine? Debbie
  8. Hi, OK, problems solved. After an awful lot of trial and error testing, I found that it was the php_snmp.dll module that was causing the error. It was being included in the extensions section at the bottom of the php.ini file, so I deleted the line and the MIBS messages stopped appearing. The 'Error in my_thread_global_end()' message was being caused by the php_netools.dll module, so I deleted that one from the extension list too. Now for the websites not being recognised. Because of the length of time it was taking to track down, I knew it would turn out to be one of those problems that would end up with a very simple solution. And I wasn't disappointed; it was that I had forgetten to restore my hosts file into system32/drivers/etc. How utterly embarrassing, but thank you everyone who helped me eventually get there. Debbie
  9. Hi, I'm having a problem getting Apache to recognise my development websites after I did a Windows reinstall last week. I hadn't changed anything in the Apache folder since before the reinstall, when everything was working fine. The only thing I did was to install Apache as a service and start it - the conf files were exactly as they were before. When I found there was a problem, I did a few trial and error experiments, but got nowhere, so I downloaded the latest Apache build from Apache Lounge (because I need ssl built in too) and replaced the old files with the new ones and transferred my old settings to the new conf files. I still had the same problem. I have found there are some strange error messages appearing in the error.log file: [Mon Sep 22 04:31:06 2008] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] [Mon Sep 22 04:31:07 2008] [notice] Apache/2.2.9 (Win32) mod_ssl/2.2.9 OpenSSL/0.9.8i PHP/5.2.5 mod_perl/2.0.4-dev Perl/v5.10.0 configured -- resuming normal operations [Mon Sep 22 04:31:07 2008] [notice] Server built: Sep 21 2008 10:26:19 [Mon Sep 22 04:31:07 2008] [notice] Parent: Created child process 552 [Mon Sep 22 04:31:08 2008] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] [Mon Sep 22 04:31:09 2008] [notice] Child 552: Child process is running [Mon Sep 22 04:31:09 2008] [notice] Child 552: Acquired the start mutex. [Mon Sep 22 04:31:09 2008] [notice] Child 552: Starting 64 worker threads. [Mon Sep 22 04:31:09 2008] [notice] Child 552: Starting thread to listen on port 80. [Mon Sep 22 04:31:09 2008] [notice] Child 552: Starting thread to listen on port 80. [Mon Sep 22 04:31:21 2008] [notice] Parent: Received shutdown signal -- Shutting down the server. [Mon Sep 22 04:31:21 2008] [notice] Child 552: Exit event signaled. Child process is ending. [Mon Sep 22 04:31:22 2008] [notice] Child 552: Released the start mutex [Mon Sep 22 04:31:23 2008] [notice] Child 552: All worker threads have exited. Error in my_thread_global_end(): 1 threads didn't exit [Mon Sep 22 04:31:28 2008] [notice] Child 552: Child process is exiting Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none) [Mon Sep 22 04:31:28 2008] [notice] Parent: Child process exited successfully. Error in my_thread_global_end(): 1 threads didn't exit So, I have two questions: 1. Does anyone know whether the 'Error in my_thread_global_end()' or the 'Cannot find module' messages would be the cause of my websites not being found? 2. Can anyone let me know what the 'Cannot find module' messages mean and how to fix them? Debbie
  10. Hi, I have a problem with an ajax triggered field in Firefox. The ajax it is working fine, but there seems to be a very curious thing happening in Firefox that doesn't happen in the other browsers. When I change the field value in the browser (not from within code) from nothing to something, the field doesn't trigger. However, any other combination (i.e. from a value to another value or from a value to spaces), does trigger the field. Has anyone come across this behaviour with Firefox and found a solution to it? Debbie
  11. Hi thorpe, Thank you for the code. I guess I'll have to continue looking for something I can use on both platforms. Mencoder has been mentioned on another forum. Would this be something that might do what I need? Debbie
  12. Hi thorpe, Could you show me the command you used to combine the two mpegs? The other thing that it seems I have to do, is that I would have to compile ffmpeg myself, both on my development machine (windows) and on my hoster's machine (linux). Two problems here: 1. I've tried compiling source like this before on my windows machine and completely failed, so I have no real idea how to achieve this. 2. I won't be able to compile anything on my hoster's machine, because they don't allow this kind of activity. I would preferably like to download a pre-compiled version of ffmpeg that I can just upload directly to my hosting account, so it is ready to use. Do you know if I could find a pre-compiled version anywhere? Debbie
  13. Hi thorpe, Is this a linux command that can be executed from php? Also, from what I've read so far, it may not be as simple as just concatenating files, because video files have headers that need to be deleted for subsequent files and reworked for the first file in the sequence. I don't know how accurate this is or whether it is true for all video/audio files. Is this true or can files just be concatenated, because I would really love it, if it really is that simple. Debbie
  14. Hi thorpe, I've looked at the documentation of ffmpeg, but I couldn't see any option that allowed more than one input file to be combined into one output file. Could you tell me if you know whether ffmpeg allows more than one input file or is only for doing audio/video file type conversions? Debbie
  15. Hi, I would like to add a feature to my site that combines two video files together and makes the result available for download. So I've been trying to find somewhere that describes how to do this with code (I use php), but so far haven't been able to find anything. Can anyone tell me how I can do this (either with code or by installing a program on my server that I can call from code to do the combining of the videos) or point me in the right direction to learn how to do it myself? Debbie
×
×
  • 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.