Jump to content
Old threads will finally start getting archived ×

raa

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

raa's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. raa

    php4 to php5

    thank you so much for everyones replies/help.. The column isn't a timestamp so I just went ahead and used = instead of LIKE. Seemed to solve it..
  2. raa

    php4 to php5

    var_dump return was false. pg_last_error returns; "ERROR: operator does not exist: date ~~ unknown LINE 6: and O.delivery_date like '2012-05-07%' ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts." Now I didn't have access to this script before the "upgrade" to php5 but I'm assuming this query must have ran fine in php4 cuz the customer said everything was peachy..
  3. raa

    php4 to php5

    Hello guys, I'm helping someone who has needed to go from Debian/php4 to Ubuntu/php5 on their webserver. Its a small business who had their page made some years back(like 10 maybe). Since their OS/php version has changed there are some PostgreSQL queries that don't seem to work anymore. I'm used to MySql so PostgreSQL is completely new to me. I've tried searching the interweb and didn't find much if anything. Here is the function that has the query in it. function get_all_days_products($order_day, $order_month, $order_year) { $conn = connectEfesDB(); if (!$conn){ noDBConn($conn); exit; } if($order_day < 10) $order_day = "0$order_day"; if($order_month < 10) $order_month = "0$order_month"; $query = "SELECT distinct P.product_id, product_code FROM products as P, order_items as OI, orders as O WHERE P.current_product='t' and O.order_id = OI.order_id and OI.product_id = P.product_id and O.delivery_date like '$order_year-$order_month-$order_day%' order by P.product_id"; $products = pg_query($conn, $query); if (!$products){ return; } for ($i=0; $i<pg_numrows($products); $i++){ $product_list[$i]["id"] = pg_result($products, $i, 0); $product_list[$i]["code"] = pg_result($products, $i, 1); } return $product_list; } Now all I know so far is it returns nothing. I don't have PostgreSQL on my personal webhost so I haven't been able to test around too much. Do you see anything in there that would stop working going from php4 to php5? Thanks so much any help..
×
×
  • 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.