CincoPistolero Posted January 17, 2009 Share Posted January 17, 2009 I have query that wants to populate some select drop down boxes. $at2query="SELECT sh.name as shell, sh.basePrice as shellPrice, f.name as finish, f.basePrice as finishPrice, s.size as size, p.basePrice as tomPrice FROM kitSpecs ks, shell sh, finish f, size s, prices p WHERE ks.artistID='$artistID' AND ks.tom2shell=sh.shellID and ks.tom2finish=f.finishID AND ks.tom2=p.pricesID AND s.sizeID=p.sizeID"; $at2result=mysql_query($at2query) or die ("Error in query: $at2query. " . mysql_error()); $at2row=mysql_fetch_array($at2result); extract($at2row); However, there is a good chance that there will be no data in the DB for the query. So I've written code that checks to see if one of the above fields in blank, and then it just writes the dropdowns with the option Selected set to --Select Option--. This if else statement works except i get a big function.extract error on my page. Is there a way to keep that error from popping up. I have about a bijillion dropdowns on this page, some of which will be auto-populated from db and some which won't. I want to be able to select from the non-populated ones and eventual write the new data to a new table. thx Quote Link to comment https://forums.phpfreaks.com/topic/141153-error-warning-extract-functionextract-first-argument-should-be-an-array/ Share on other sites More sharing options...
RussellReal Posted January 17, 2009 Share Posted January 17, 2009 I'm sorry.. but you've confused me buddy Quote Link to comment https://forums.phpfreaks.com/topic/141153-error-warning-extract-functionextract-first-argument-should-be-an-array/#findComment-738902 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.