Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008
    Posts
    7
    Plugin Contributions
    0

    Default sql programming problems

    I'm trying to modify my website with zencart and by all means, i think this should work, but its not. I was wondering if someone could tell me where I am going wrong

    PHP Code:
            $sql "select max(customer_id) as total from zen_customers";
            
    $zen_user_id = ($db->sql_query($sql) + 1); 
    when i test this in phpMyAdmin, the value seems to be the last in the table plus one, but when I run it through my website it gives me an earlier number, which causes problems. For some reason I can't find the problem, can someone tell me where I went wrong?

  2. #2
    Join Date
    Aug 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: sql programming problems

    nevermind. I know what I did wrong. I tried editing the post, but it doesn't seem to let me.

 

 

Similar Threads

  1. Programming glitch?
    By Feznizzle in forum General Questions
    Replies: 17
    Last Post: 15 Jul 2010, 02:51 PM
  2. sql table problems after upgrade
    By fairview in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 6 Apr 2009, 10:18 PM
  3. SQL commands creating connection problems?
    By thinknirmal in forum General Questions
    Replies: 10
    Last Post: 11 May 2008, 12:24 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR