▼  Site Navigation Main Articles Search  ▼  Anime + Manga Anime Reviews Anime Characters Gallery Screenshots Manga Reviews  ▼  Misc News Links to Webcomics Bible Quotes About Older Musings
site version 7.3
older
newer

5/8/20
Friday 2:11pm


Date Posted:
5/8/20

Coding note:  MySQL: When pulling results that contain duplicates you may want to use DISTINCT.  

Example:
SELECT DISTINCT t1.ID, t2.ID from t1, t2


To use an array in a SELECT statement I used
t1.ID NOT IN ( '" . implode( "', '" , $hidden ) . "' )
ref

Example:
"SELECT DISTINCT t1.ID, t1.date, t1.summary, t1.title
FROM t1, t2
WHERE t2.cat_ID!=$name_ID
AND t2.cat_ID!=22
AND t2.art_ID=t1.ID
AND t1.ID NOT IN ( '" . implode( "', '" , $bad) . "' )
ORDER BY date DESC
LIMIT 0, 7";


archives


TAGS: mysql

All Memo Tags
anime 1, article 1, audio 1, commercial 1, computer 5, games 22, hard to remember 1, keyboard shortcuts 1, links 1, memo blog 1, mini-review 5, moving 2, music 1, mysql 1, news 12, none 1635, opera 68, private 4, quotes 1, reformat hard drive 19, sgopc 1, site update 12, site version 205, star wars 2, swtor 1, video 1, website 9, wishlist 3

copyright 2005–2020