Bonjour,
Je viens demander l'aide pour une requête qui part en Maximum execution time si quelqu'un pourra m'aider à résoudre mon problème ce sera top.
Je veux effectuer une requête pour afficher des données sur les clients comme la dernière commande, la dernière connexion, le nom, l'adresse etc... j'ai donc fait cette requête mais elle me renvoie un Maximum execution time.
Code sql : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
$customers_query_raw = "select c.customers_id,
    							  c.customers_lastname,
    							  c.customers_firstname,
    							  c.customers_email_address,
    							  c.customers_gender,
    							  c.customers_dob,
    							  c.customers_telephone,
    							  c.customers_fax,
								  c.customers_newsletter,
    							  a.entry_company,
    							  a.entry_street_address,
    							  a.entry_postcode,
    							  a.entry_city,
    							  a.entry_state,
    							  a.entry_suburb,
								  ci.customers_info_date_account_created,
								  oi.date_purchased,
								  oi.orders_id,
    							  co.countries_name
 
    							   from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id
    							   left join " . TABLE_COUNTRIES . " co on co.countries_id = a.entry_country_id
								   left join " . TABLE_CUSTOMERS_INFO . " ci on ci.customers_info_id = c.customers_id
								   left join " . TABLE_ORDERS . " oi on oi.customers_id = c.customers_id
								   where c.customers_newsletter=1 and oi.orders_id in (select distinct (oi.orders_id) from " . TABLE_ORDERS . " where oi.customers_id = c.customers_id)
    							   order by oi.orders_id DESC";
    $customers_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS * 4, $customers_query_raw, $customers_query_numrows);
    $customers_query = tep_db_query($customers_query_raw);
Merci