Jump to content

Error: Warning: extract() [function.extract]: First argument should be an array


CincoPistolero

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.