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

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.