Slice's Profile User Rating: -----

Reputation: 241 Stalwart
Active Members
Active Posts:
698 (0.34 per day)
24-November 08
Profile Views:
Last Active:
User is offline Jul 28 2014 04:39 AM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:

Latest Visitors

Icon   Slice has not set their status

Posts I've Made

  1. In Topic: Signature of the Month (July 2014)

    Posted 18 Jul 2014

    A quick one, going for the symbolism.

    Posted Image

    Edit: Added username
  2. In Topic: Selecting date ranges based on two dates

    Posted 31 May 2014

    View Postmodi123_1, on 30 May 2014 - 04:04 PM, said:

    That doesn't really look like MYSQL queries..

    Yeah sorry I should have posted it just in query format rather than zends format.

    The problem that I was having was it took into account two dates, which were far apart. Let's say it was a database for a movie theatre, and Captain Americas first showing was on the 10th of March, and last showing was on the 29th of May, and those were the only two dates you have in the database. You know it's going to be showing at regular intervals between those dates but you don't have the specific dates and times.

    So if someone was on the website, and they clicked "what's showing in April" , Captain America should be on the list, but neither of the dates are in April. I tried using a between query originally and failed, but I've managed to get it to do what I want this time.

    My solved query (feel free to nitpick it or recommend improvements):
    //added hardcoded dates for example
    SELECT * FROM `shows` 
    WHERE `showingfrom` BETWEEN '2014-05-01' AND '2014-05-31' 
    OR `showingto` BETWEEN '2014-05-01' AND '2014-05-31' 
    OR `showingfrom` < '2014-05-01' AND `showingto` > '2014-05-31'

    and for anyone interested in the Zend query:
    //in this query I added a greater than today for end date, just incase they are trying to load this months and somethings already finished
            ->between('showingfrom', $start, $end)->and->greaterThan('showingto', $today)
             ->between('showingto', $start, $end)->and->greaterThan('showingto', $today)
             ->lessThan('showingfrom', $start)->and->greaterThan('showingto', $end)->and->greaterThan('showingto', $today);
  3. In Topic: a little comic relief

    Posted 22 May 2014

    I carry on with my life.
  4. In Topic: Signature of the Month (May 2014)

    Posted 7 May 2014

    Attempted a couple of modern movie quotes but just couldn't seem to get them to sit right, so I've gone for a classic instead.

    Posted Image
  5. In Topic: PDO Login in PHP Error!

    Posted 26 Apr 2014

    When you say it's not working, do you mean that it is throwing an exception? an error? Or just redirecting you back to the signup page with no session being set?

    If it's an error, then posting it here would help.

    If you are being redirected back to the signup page then it's because the count is returning zero which means a problem with your details or within the query / fetch.

My Information

Member Title:
sudo pacman -S moneyz
24 years old
November 6, 1989
web design and development

Contact Information

Click here to e-mail me
Website URL:
Website URL



Page 1 of 1
  1. Photo

    Slice Icon

    30 Jul 2012 - 09:45
    Do I need to collect my cash reward in person? ;)
  2. Photo

    modi123_1 Icon

    30 Jul 2012 - 09:09
    Oh.. someone got a new award!
Page 1 of 1