Databases :: MySql :: calling a mysql value in a php script |
|||
| By: Squibi |
Date: 26/01/2003 00:00:00 |
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 | 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 |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








