Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. heals1ic

    Javascript function

    Thanks I changed the function name to signupnow() and it seems to work. I have never come accross this issue before though?
  2. heals1ic

    Javascript function

    For the life of me I cannot seem to sort out what I am doing wrong here. My firefox error console reports that signup is not a function : The script is in the header. <script language="JavaScript"> function signup(){ alert("Hello"); }; </script> <form name="signup">...
  3. heals1ic

    perl sql concat error

    I seem to have solved the problem with: use (strict); and declaring the variables using "my". Thanks people for your help
  4. heals1ic

    perl sql concat error

    mbrooks: $urow->{userid} does contain the desired result. I don't think it would be the cause of this error anyway. MikeLacey: The printout is just what I intent to send as an sql statement.
  5. heals1ic

    perl sql concat error

    I have tried your code and it still gives me an error: Use of uninitialized value in concatenation (.) or string at email_prefs.pl line 16. Line 16 is the line where the prepare statement is. Is there a problem with the tablename.fieldname naming in the SQL. Does Perl see this as a...
  6. heals1ic

    perl sql concat error

    I am trying to execute a mysql query- $sql = "SELECT S.supplier, S.sup_img, C.prodid, D.product, D.catid, C.minprice FROM suppliers S INNER JOIN (SELECT B.supplierid, A.prodid, A.minprice FROM sup_prices B INNER JOIN (SELECT X.prodid, MIN(X.price_each) minprice FROM sup_prices X INNER...
  7. heals1ic

    Min value for a category

    I will start off by posting my SQL code first- SELECT X.prodid, Y.product, X.supplierid, MIN( X.price_each ) AS minprice FROM sup_prices X INNER JOIN ( SELECT PP.prodid, PP.product FROM products PP INNER JOIN prefs PR ON PP.catid = PR.catid AND PP.prodid = PR.pref WHERE userid =1 )Y...
  8. heals1ic

    Select minimum results

    Just analysing the query. How will it react if 2 suppliers have the same minimum price?
  9. heals1ic

    Select minimum results

    PVH Your a legend!! Query took 0.0785 sec. Cheers. What a difference it makes to have added those extra inner joins. Now I have to figure out why it works so well in place of the other queries.
  10. heals1ic

    Select minimum results

    Sorry it was my fault that the product LIKE '%%%' was included in the supplied query. I could not edit it after I submitted the post. I am also aware that this filter will have overheads on the query so I have removed it from my main query. Not much difference in performance. Golom earlier...
  11. heals1ic

    Select minimum results

    I have 8 suppliers, 328 products totalling 2625 records in the sup_prices table. Tried the sub query by it's self and no probs. But the query as a whole still takes around 35 sec. I am not using any indexing at the moment as I am unsure where to apply the indexing. Do you have any experience...
  12. heals1ic

    Select minimum results

    -- Sorry some mistakes in the last post -- (I cannot edit it after posting) I tried your query against the database and not really and difference in speed. Is there another way of speeding this query up such as indexing some fields or to change the table structure from - PRODUCTS table |...
  13. heals1ic

    Select minimum results

    I tried your query against the database and not really and difference in speed. Is there another way of speeding this query up such as indexing some fields or to change the table structure from - PRODUCTS table | prodid | catid | product | ------ SUP_PRICES table | prodid | catid |...
  14. heals1ic

    Select minimum results

    Thanks for your replys guys I have taken your suggestions and developed this expression SELECT supplier,product,price_each as price, sup_prices.prodid as prodid FROM products, sup_prices, suppliers WHERE (sup_prices.prodid,price_each) IN (SELECT sup_prices.prodid, min(price_each) FROM...
  15. heals1ic

    Select minimum results

    I have a table structured as such: customerid, productid, price I would like to extract the minimum price for each product and which supplier it is. this is my code so far: SELECT supplierid, productid, min(price) FROM `sup_prices` group by price order by productid This gives me all the...

Part and Inventory Search

Back
Top