SQL Question

Results 1 to 2 of 2

Thread: SQL Question

  1. #1
    Join Date
    Dec 1969

    Default SQL Question

    I need help with this SQL string:<BR><BR>mySQL = "SELECT vins_dc.order_id AS vorder, orders.order_id AS sorder, vin, stock_number, roof_height, wheel_base, color, order_ip, multi_id_order,idcustomer, sales_person, sales_person_id, sales_person_phone, purchase_order,package_code_Z_S, package_code_Z_P, package_code_T_S, package_code_T_P, order_total,date_required, install_location, order_status FROM " _<BR>& "vins_dc, orders " _<BR>& "WHERE orders.order_id = &#039;" & pmulti_id_order & "&#039; " _<BR>& "OR orders.multi_id_order = &#039;" & pmulti_id_order & "&#039; " _<BR>& "AND vins_dc.order_id = &#039;" & pmulti_id_order & "&#039;"<BR><BR><BR>When i use this it should return all records from my table that equal the number in the pmulti_id_order string. What happens is i get all records in the tables instead. <BR><BR>Any Help would be great.

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Question

    ok two things<BR><BR>1) are orders.order_id, orders.multi_id_order and vins_dc.order_id all character or are they numeric fields if numeric then remove the single quote from arround them!<BR>2) what exactly are you passing do <BR>Write.response mySQL

Posting Permissions

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