Thread: Need your help

Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2007
    Posts
    82
    Plugin Contributions
    0

    Default Need your help

    Here is the code to update the stock of items belongs to table of products_licences . But this code also change the items that is not belong to the products_licences. So any item not belong to products_licences will be update as stock=0.

    What should I do? I am a novice of php.


    PHP Code:
                  $dbres $db->Execute('SELECT count(*) AS count FROM products_licences' 
                           
    ' WHERE products_id='.$this->products[$i]['id'].' AND orders_id IS NULL' 
                           
    ); 
            
    $db->Execute('UPDATE deals_products SET products_quantity='.$dbres->fields['count'].' WHERE products_id='.$this->products[$i]['id']); 
    Last edited by eaglewu; 20 Mar 2007 at 08:28 AM.

 

 

Similar Threads

  1. Big problems, need fixing, need your help guys :)
    By vinogradov in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 28 Aug 2010, 06:23 PM
  2. Need your help.
    By Avalonze in forum General Questions
    Replies: 1
    Last Post: 10 Jun 2008, 04:25 AM
  3. I need your help please !
    By alhakeem2001 in forum General Questions
    Replies: 6
    Last Post: 7 Jan 2008, 02:26 PM
  4. Need your help ~~
    By hebbe in forum General Questions
    Replies: 3
    Last Post: 11 Nov 2007, 09:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg