Jump to content

Search the Community

Showing results for tags 'db2'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 7 results

  1. I'm trying to alter a db2 query in my php script and it's not executing properly when doing so. In the last line of my WHERE clause for the DB2 select, I'm using this: AND date(substr(extd2d,1,4)||'-'||substr(EXTD2d,5,2)||'-'||substr(EXTD2d,7,2)) >= {$row['start_date']} but getting an error that >= is not a valid comparison operand. However, if I remove {$row['start_date']} and use current_date or current_date - 100 DAY, it works perfectly. To clarify, the value for 'start_date' in mysql is DATE data type and the value 'extd2d' in db2 is a packed field value that holds a
  2. I have two functions, one loading data and the other loading the data into an html table. I've done this for 3 other data sets without issue but this one is not loading into the table for some reason. The html table loads but it's empty. I have error printing on but there are no errors. Also the query returns the correct results when I manually run it so I know it's getting results, plus it's printing the result resource ID. So my result prints, and my html table shows up, but the results are not in the table so I'm assuming maybe I'm not passing it to the table properly? Any guidance here
  3. I have a successful select query, where I'm looping and building a row for getting parameters which works correctly while ($row = $orderDetailCheck->fetch(PDO::FETCH_ASSOC)) { $params = [ ":INVOICE_NUMBER" => $row["INVOICE_NUMBER"], ":CUSTNM" => $row["CUSTNM"], ":SELLINGN" => $row["SELLINGN"], ":GROUP" => $row["GROUP"], ":DTL12" => $row["DTL12"], ":DTL13" => $row["DTL13"], ":QUANTITY" => $row["QUANTITY"],
  4. I have a query where I'm selecting records from DB2 database and storing the values in an array: $orderIdsStr = "'" . implode("', '", $order_ids) . "'"; //SELECT FROM DB2 WITH THE ORDER NUMBERS FIRST $query = "SELECT invnoc as INVOICE, cstnoc AS DEALER, framec AS FRAME, covr1c AS COVER, colr1c AS COLOR , extd2d AS SHIPDATE, orqtyc AS QUANTITY FROM GPORPCFL WHERE invnoc IN ({$orderIdsStr}) GROUP BY invnoc,cstnoc, slsnoc, orqtyc, framec, covr1
  5. My code is creating an array and I have it printing to ensure that it has the right values, which it does. The problem is it seems to be creating too many arrays or array subsets in the loop. Each array should be for one invoice and look like this: [0] => Array ( [iNVOICE] => 12605987 [DEALER] => 12314 [FRAME] => 43845 [COVER] => 1228 => 49 [sHIPDATE] => 20170517 [QUANTITY] => 2 ) This is how it's currently printing for each invoice, and it's pulling all the right invoices and data, just too
  6. I have a script that 'works' but I had an oversight in logic and I'm trying to rectify it. Basically, the below script selects orders from a db2 database, and every item on each order. What I'm doing is adding date intervals to the products for a time period that we believe that product to be on shelves. A customer should only have a number of records for any individual prodcut that's equal to number of stores they have, within the expiration window. An example: If I'm customer 123 and I have 5 stores. Today I placed an order for skus 1,2, and 3 and I bought 2 of each. That's 2 records per
  7. I'm creating an array out of a select statement but it's currently printing an empty array. I've tested the query manually and know for a fact that it should contain information but I could be missing something in translating the data from the odbc connection over to the mysql connection. I'm putting the entire code block below, the print_r statement at the end is the array being printed that's empty. Everything else in the code is working perfectly, but my ```$dealerSkuCheck``` query should be pulling orders from mysql by equating those fields to the previously retrieved Db2 values, in th
  • 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.