Jump to content

SQL tells me table doesn't exist when it does?


socalnate

Recommended Posts

I can't figure out why SQL is telling me why this table doesn't exist when it clearly DOES exist in my database.  Any ideas?  Something wrong with my SQL query?

 

Nathan  :-[

__________

 

Error

 

SQL query: Documentation

 

SELECT eg_titles. * , eg_genres.id, eg_gameplay_history.title_id, eg_gameplay_history.played, eg_gameplay_history.play_date, COUNT( eg_gameplay_history.played ) AS 'title_count'

FROM eg_titles

LEFT JOIN eg_genres ON eg_titles.id = eg_genres.title_id

WHERE eg_genres.genre = 'action'

AND eg_titles.id = eg_gameplay_history.title_id

AND eg_gameplay_history.play_date

BETWEEN DATE_SUB( CURDATE( ) , INTERVAL 3

DAY )

AND CURDATE( )

GROUP BY eg_gameplay_history.title_id

ORDER BY title_count DESC

LIMIT 10

 

MySQL said: Documentation

#1109 - Unknown table 'eg_gameplay_history' in field list

 

 

Thanks,

 

This query worked!  ;D  The only issue I'm having is that it is very slow...3.0645 seconds!  :'( Any suggestions?

 

SELECT eg_titles. * , eg_genres.id, eg_gameplay_history.title_id, eg_gameplay_history.played, eg_gameplay_history.play_date, COUNT( eg_gameplay_history.played ) AS 'title_count'FROM eg_titles, eg_gameplay_history LEFT JOIN eg_genres ON eg_titles.id = eg_genres.id

WHERE eg_genres.genre = 'action' AND eg_titles.id = eg_gameplay_history.title_id

AND eg_gameplay_history.play_date

BETWEEN DATE_SUB( CURDATE( ) , INTERVAL 3

DAY )

AND CURDATE( )

GROUP BY eg_gameplay_history.title_id

ORDER BY title_count DESC

LIMIT 10

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.