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...
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...
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...
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...
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'] ==...
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...
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.
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...
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?
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...
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.
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...
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...
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...
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...
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.