▼  Site Navigation Main Articles News Search  ▼  Anime + Manga Anime Reviews Anime Characters Gallery Screenshots Manga Reviews  ▼  Misc 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

allegory 1, anime 1, article 6, audio 2, books 3, bug 19, code 1, commercial 1, computer 15, election 2, ereader 5, fixed 11, games 24, hard to remember 1, history 1, keyboard shortcuts 1, links 2, memo blog 1, mini-review 10, moving 2, music 1, mysql 1, news 31, none 1840, opera 69, politics 9, private 14, quotes 1, reformat hard drive 19, sgopc 1, site update 15, site version 205, sleep 3, star wars 2, story 4, swtor 1, texas 1, video 5, website 22, windows 10 1, wishlist 3

copyright 2005–2024