Add 1 to a field * Cinema Guy 05:34 Add Comment Edit Question How do I turn the following 2 queries into 1 query $sql = "SELECT level FROM skills WHERE id = $id LIMIT 1;"; $result ... Read More
Better Random Generating PHP * Cinema Guy 20:18 Add Comment Edit Question I know that just using rand() is predictable, if you know what your doing, and have access to the server. I have a project that ... Read More
Accessing a CONST attribute of series of Classes * Cinema Guy 15:58 Add Comment Edit Question This is how I wanted to do it which would work in PHP 5.3.0+ <?php class MyClass { const CONSTANT = ... Read More
Locking a SQL Server Database with PHP * Cinema Guy 10:36 Add Comment Edit Question I'm wanting extra security for a particular point in my web app. So I want to lock the database (SQL Server 2005). Any suggesti... Read More
Version control PHP Web Project * Cinema Guy 09:46 Add Comment Edit Question We have a php project that we would like to version control. Right now there are three of us working on a "Dev" version o... Read More
How to sell Python to a client/boss/person with lots of cash * Cinema Guy 09:43 Add Comment Edit Question When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when th... Read More
How to easily consume a web service from PHP * Cinema Guy 22:48 Add Comment Edit Question Is there available any tool for PHP which can be used to generate code for consuming a web service based on its WSDL ? Something c... Read More
How to include PHP files that require an absolute path? * Cinema Guy 20:46 Add Comment Edit Question I have a directory structure like the following; /script.php /inc/include1.php /inc/include2.php /objects/obje... Read More
Multi-Paradigm Languages * Cinema Guy 14:02 Add Comment Edit Question In a language such as (since I'm working in it now) PHP, which supports procedural and object-oriented paradigms, is there a go... Read More
PHP Error - Uploading a file * Cinema Guy 09:13 Add Comment Edit Question I'm trying to write some php to upload a file to a folder on my webserver. Here's what I have: <?php if ( !empty($_... Read More
MySQL/Apache Error in PHP MySQL query * Cinema Guy 14:45 Add Comment Edit Question I am getting the following error: Access denied for user 'apache'@'localhost' (using password: NO) ... Read More
Lightweight IDE for Linux * Cinema Guy 12:57 Add Comment Edit Question Even though I have a robust and fast computer (Pentium Dual Core 2.0 with 2Gb RAM), I'm always searching for lightweight softwa... Read More
File size differences after copying a file to a server vÃa FTP * Cinema Guy 06:40 Add Comment Edit Question I have created a PHP-script to update a webserver that is live inside a local directory. I'm migrating the script into Python. ... Read More
Why is my ternary expression not working? * Cinema Guy 17:56 Add Comment Edit Question I am trying to set a flag to show or hide a page element, but it always displays even when the expression is false. $canMerge ... Read More
How can I get at the matches when using preg_replace in PHP? * Cinema Guy 17:35 Add Comment Edit Question I am trying to grab the capital letters of a couple of words and wrap them in span tags. I am using preg_replace for extract and w... Read More
Mechanisms for tracking DB schema changes * Cinema Guy 14:31 Add Comment Edit Question What are the best methods for tracking and/or automating DB schema changes? Our team uses Subversion for version control and we... Read More
Using object property as default for method property * Cinema Guy 10:51 Add Comment Edit Question I'm trying to do this (which produces an unexpected T_VARIABLE error): public function createShipment($startZip, $endZip, ... Read More
How can I get the authenticated user name under Apache using plain HTTP authentication and PHP? * Cinema Guy 10:02 Add Comment Edit Question First, let's get the security considerations out of the way. I'm using simple authentication under Apache for a one-off, in... Read More
Make XAMPP/Apache serve file outside of htdocs * Cinema Guy 09:54 Add Comment Edit Question Is it possible to configure xampp to serve up a file outside of the htdocs directory? For instance, say I have a file: C:\p... Read More
How do you debug PHP scripts? * Cinema Guy 16:18 Add Comment Edit Question How do you debug your PHP scripts? I am aware of basic debugging such as using the Error Reporting. The breakpoint debugging in... Read More