anonīms Posted May 20, 2010 Report Share Posted May 20, 2010 kollona flags ir apmēram šāda: adbadavzx (flagu sistēma, kā amxbans, etc.) $speles_ar = array( 'NHL'=>'v', 'NBA'=>'z', 'FIFA'=>'x', 'NFL'=>'y' ); foreach($speles_ar AS $q=>$v) { $q." admini<br /><br />"; $Q = query("SELECT id, lietotajvards FROM ".PREFIX."lietotaji WHERE flags = '?'"); while($admini = mysql_fetch_assoc($Q)) { echo '<a href="/user/'.$Q['id'].'">'.$Q['lietotajvards'].'</a><br />'; } } Jautājums ir tāds: Kā iekšs WHERE dabūt iekšā šādu php kodu? strpos($lietotaja_flagi, 'a') kas pārbaudītu, vai kollonā ir kāds no dotajiem stringiem. Quote Link to comment Share on other sites More sharing options...
briedis Posted May 20, 2010 Report Share Posted May 20, 2010 gūglē: mysql column containts Quote Link to comment Share on other sites More sharing options...
anonīms Posted May 20, 2010 Author Report Share Posted May 20, 2010 Thx. Izmantoju LIKE atribūtu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.