What's happening?
I got this error:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Invalid column name 'astralis'.
/main.asp, line 118
I know the Ad_Poster column exists.
This is the SQL:
infoSQL = "SELECT TOP 10 ADS.AD_ID as ad_id, ADS.ad_title, ADS.ad_poster, ADS.cat_id AS cat_id, ADS.ad_dated, ADS.ad_price, ADS.ad_state, ADS.ad_price, ADS.ad_zip, ADS.ad_approved, ADS.ad_expired, ADS.ad_description, CATS.CAT_ID, AD_IMAGES.ad_id" _
& " FROM ADS, AD_IMAGES, CATS " _
& " WHERE AD_APPROVED = 1 " _
& " AND ADS.AD_POSTER = " & CC_Username _ <-This is calling the correct variable and the variable exists in the database, in that column
& " AND ADS.AD_ID=AD_IMAGES.AD_ID " _
& " AND CATS.CAT_ID like ADS.CAT_ID " _
& " AND AD_EXPIRED > getDATE() " _
& " AND CATS.CAT_ID=2 " _
& " ORDER BY AD_DATED desc"
I suspect I wrongly joined the tables but I'm not sure. Any advice?
Or does the CC_Username need to be in quotes?