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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.