php - show numbers there are not in a column in MySQL -


i have formfield can put in numbers in value between 1 - 10. numbers saved in mysql database. looking how make query can return numbers in database, has not been put in through formfield.

fx: if following number has been put in: [1,4,8,9,10] have div tag there printing numbers out.

that means following numbers need printet in div tag is: [2,3,5,6,7]

but quite in doubt how that, because numbers not exist in database yet, because number has not been put in yet.

update:

if there has been typed in 1000 numbers between 1 - 10, numbers of course registred. query should work 5 numbers have been registered fewest times showing up.

i have tried this, of course not working. maybe can use start?:

$stmt = $mysqli->prepare("select numbers numbertable group numbers order count(*) asc limit 10;"); 

best regards mads

like this:

select numbers yourtable numbers not in (2,3,5,6,7) 

that's basic idea of how syntax works. want build "not in" list, you.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -