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 gkittelson 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. krisc13

    is delete impossible?

    It was a glitch when we migrated data from another database. Some customers were entered more than once. Some 4 and 5 times actually. But this is 90k out of 500k so I'd rather not do the whole thing over. I have a customer table with customer id and names. I have another table that connects the...
  2. krisc13

    is delete impossible?

    Well see the table I want to delete them from is all ids. I've determined which customers repeat based on the user_id connected to them. If John Smith is with 192 twice, it's a duplicate. But John Smith's ids are 123 and 456. In my table I have 123 with 192 and 456 with 192. I want one to go...
  3. krisc13

    is delete impossible?

    I have a database with duplicate customer records. However the only fields that duplicate are the first and last name fields and the id of the user connected to them. Not their ids. I have created a table with the duplicates. The problem is I have no idea how to write the statement to delete...
  4. krisc13

    For loops kill query

    Yes $g_u is the entire result set. $search_customers is another result set. I'm comparing the two. I want my group users ($g_u) to contain my search results instead of the original list. I believe the original programmer was trying to sort of swap the original group users variable that held...
  5. krisc13

    For loops kill query

    My program uses the following for loops to search customer records. $search_customers are the records being searched for and $g_u is the result set from mySQL query. for ($i=0; $i<sizeof($g_u); $i++){ for ($x=0; $x<sizeof($search_customers); $x++){ if ($g_u[$i]['user_id'] ==...
  6. krisc13

    three table join

    I have a customer id in a customer table that I need to insert into the proper rows (update) of an activity table. The tables connect through a third table the person table. The following select statement seems to work... SELECT `customer`.`cust_id` FROM `f_agent`.`customer` LEFT JOIN...
  7. krisc13

    huge table

    We're using unix timestamps because the code within the program uses unix timestamps. That how we want to save them. We also tried order by lead_date and that did not help. I'll look into the other things you mentioned now.
  8. krisc13

    huge table

    'customer', 'CREATE TABLE `customer` ( `cust_id` int(9) unsigned NOT NULL auto_increment, `cust_person_id` int(9) unsigned NOT NULL default '0', `cust_group_id` int(5) unsigned NOT NULL default '0', `cust_priority` int(1) unsigned NOT NULL default '0', `cust_pipeline_status`...
  9. krisc13

    huge table

    Well we've tried everything. You can now login but it takes over 5 minutes for the page to load. Perhaps there is something we can do to the tables in mySQL besides an index? I'm at a loss...
  10. krisc13

    huge table

    Yes and it still timed out or hung rather. When we remove the order by it flies.
  11. krisc13

    huge table

    Yes. Okay we've ruled out everything but the order by. It seems the statement runs in 9 seconds without the order by clause. That's where it slows way down and times out. We have to have the customers ordered in this way when they display. Is there a faster way?
  12. krisc13

    huge table

    Good call we're taking off the AND. However we tried explain and it times out before finishing as well.
  13. krisc13

    huge table

    Oh no I'm sorry I explained it wrong. It's not the login query that causes the problem. It's the select statement that retrieves the customers to display to the user. The login works very well. The problem is the main page won't load because this statement takes too long. Yes the table is...
  14. krisc13

    huge table

    I have a table with over 500k customers in it. When my program loads the select statement takes so long the user never gets fully logged in. Is this the right forum to post a select statement for possible advice? It is a mySQL database.
  15. krisc13

    cannot log in

    Oh I'm sorry I didn't explain that right. The login is working it's the main page the user logs onto where this sql statement is run to retrieve all the customers for that user. We discovered it is successfully logging the person in it's the gathering of the information for what is displayed...
  16. krisc13

    cannot log in

    We've discovered that the reason the login is taking so long is because of a mySQL select statement that pulls all customers relative to that user from a table of over 500k rows. It simply takes too long. The table is indexed. Well in fact I'm probably not in the right forum now am I? At any...
  17. krisc13

    cannot log in

    Okay I've managed to echo some stuff from the login page and it appears that when the page craps out it's here: header('Location: index.php'); Everything up to that point works. I've commented out everything in index.php and put an echo on that page but it's no use. When the login page...
  18. krisc13

    cannot log in

    Yeah I can't seem to get an error message or anything. I did get in once briefly with a test user. Then it crapped out again. Still trying...I wish I knew what code to paste up here but there's so much I've no idea where to start. Line by line I guess...
  19. krisc13

    cannot log in

    Oh I am entertaining your suggestion. Tried the die command on several lines. Sorry cLFlaVA wasn't disregarding you. And yes I'm echoing the mysql_error with the die(). Thanks I'm sorry.
  20. krisc13

    cannot log in

    Okay we turned it off. Doesn't seem to have changed anything...Keep the suggestions comin tho please! Thanks so much!

Part and Inventory Search

Back
Top