visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Databases :: MySql :: calling a mysql value in a php script


By: Squibi U.S.A.  Date: 26/01/2003 00:00:00  English  Points: 50 Status: Answered
Quality : Excellent
ok I am creating a site that involves rating pictures and on my main page I call up a random picture from mysql. the thig is that I have to call from users that only have certian values in some of the member areas. i.e.

$ri_sql="select * from ". $set['prefix'] ."main where ok=1";

that is what I have now. notice how it check to make sure the ok value is 1. well I want it to check one other thing to I want it to check and make sure that the "picride" value is not blank. like I only want the pictures to appear if the picride value is not blank. how would i do that? I was told t do it like this

picride !=''

Those are to single qoutes. But this didn't work. how can i make it work. Thanks in advanced.

Thanks ~Squibi~
By: VGR Date: 26/01/2003 18:40:00 English  Type : Answer
$ri_sql="select * from ". $set['prefix'] ."main where ok=1 and picride<>''";

if picride is a column/field of the mySql table, oeuf corse

Do register to be able to answer

EContact
browser fav
page generated in 331.084010 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page