Is MySQL's BETWEEN inclusive? For example, will this give me the whole year of will it be missing a day on either end?
$TransactionYear = date("Y")."-1-1";
$YearEnd = date("Y")."-12-31";
$DSWhere = "InvoiceDate BETWEEN '".$TransactionYear."' AND '".$YearEnd."'";
Don...
In a form, I want to limit the numeric value that can be entered. For example, on a given entry, 1 or 2 can be entered but not 3. I already added a function to make it numeric-only but I have nothing at all for limiting the value, which will from be a PHP variable. Any ideas?
Don...
After thoroughly cleaning a drive that was badly infected by multiple viruses, I am trying to test it before sending it back the person whose drive it is. I know there are issues in booting a drive in another system but I thought it would at least boot up without high-res video and without other...
I am trying to reuse a function on a new site that works perfectly on one of my others but not on the new one. On the index.php page, there is some code that saves a couple values as sessions:
$ServerName = $_SERVER['SERVER_NAME'];
$ScriptName = $_SERVER['SCRIPT_NAME'];
$QueryString =...
On my development system, the magic.mime file loads as it should. However, on the live server it is not loading: invalid magic file, disabled even though the path is pointing to it. Research shows this to be a common problem but I am not sure what to do about it. Since the dev system and server...
After upgrading from the last v 4x version of PHP to the most recent v 5.2.1, the site runs but has some odd problems that I cannot seem to solve. I hope someone can help quickly as I am in a bind!
First, it loads a JavaScript menu which also contains SQL and PHP in order to be dynamic. The PHP...
After discovering some incompatibilities between a new Intranet site and PHP 5.x, I downgraded PHP to v 4.4.6. It WAS working however after rebooting the server, it now gives only a "Page not found" error on PHP pages (HTML pages still load). Any ideas? Thanks.
Don
http://www.pc-homepage.com/...
I've been pulling my hair out over this! Maybe someone who knows CSS better than I can see what's wrong. I am using styles to create rows and columns (no tables) which is working fine but one "cell" cannot have the width hard-coded so its background color stops at the end of the content. I tried...
I am trying to create simple next/back links to navigate through a record set $Result, which will be individual next/previous images). So far it shows all values as simple hyperlinks and the values themselves are just a comma-separated list of IDs. It works but I need only the previous and next...
I have a simple function that is supposed to highlight keywords and it seems to do fairly well. However, I would like to make it highlight the complete word and not just any portion that was searched but have no idea how to do it as I am weak in regular expressions.
function...
This has me pulling my hair out as I don't see anything wrong. It is working for the other characters/spaces except that the apostrophe is not being replaced:
$Characters = array(" ", chr(39), "'", " ");
$StringReplace = array(" ", "", "", "_");
$DocName = str_replace($Characters...
On an a couple MP3 files that are in a MySQL database, trying to play them simply shows the BLOB field contents. WAV files seem to play properly.
I am sending header info as:
header("Mime-version: 1.1");
header("Content-Type: " . $MimeType);
header("Content-Length: " . strlen($AudioClip))...
Since ? is a wildcard character, how can a query be written that finds entries with a field that contains it:
SELECT *
FROM PCSkills_ALL_Merged
WHERE Name LIKE '*?*';
doesn't work, and neither does
SELECT *
FROM PCSkills_ALL_Merged
WHERE Name LIKE '*chr(63)*';
nor
SELECT *
FROM...
An archived post has a function that seems to do what I need, which is to reverse and comma-separate names that are in a single field, except that in this case, some of the names have already been separated so do not need it again. Also, it seems to have a bug as it crashes on the line marked in...
I hope someone can help as I do not know Excel's special features well, and I do not know VBA at all (I presume this is a VBA issue).
I have a spreadsheet with two workbooks, one having a list of people who have taken a class; the other of all employees. I need to compare between them to see...
On a PHP/MySQL site where all content is in the database, I have been hard-coding crossreference links but it occurs to me that this can probably be done automatically.
For example, if the content has "Joe Blow" (with or without the quotes) and no existing hyperlink, it would link to...
I saw thread216-528760 which is identical to what I am trying to do but have had no success with with the code there or my own.
This needs to be somewhat versitile so that it can be used on a "Print Page" feature and a couple others on the site, so I am trying to pass into a function the...
I've read everything I can find on the subject but can't get this to work properly. I'm trying to block the direct linking of my images from outside the sites. It blocks some, but not all, images even when loaded through one of the domains listed. I tried adding "php" to the list as some images...
Do Flash files on a Linux server need to have particular permissions other than 644? A simple slide show on one of my sites was working but no longer does even though it works here on the development system. I tried uploading a fresh copy in case the one online had somehow gotten corrupt but it...
I haven't used SQL Server in several years and have forgotten how to do a simple thing. Can someone refresh my memory of how to update a part of a field while leaving the rest of the same field as it is? In this case, the field contains a URL and I need to change only the domain name. Thanks...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.