-
☆ A M B ☆
- 24,524 Posts
The error your get would be useful.
while($doc_ids=mysql_fetch_array($doQuery))
{
$doc_ids=unserialize($doc_ids['doc_ids']);
$doc_weights=unserialize($doc_weights['doc_weights']);
}
Where does the $doc_weights[’doc_weights’] come from? Isn’t it from the same query as $doc_ids? You should use a different variable for your fetch_array results, since the first reassignment of the $doc_ids variable replaces the query results. Maybe $doc_data? Then you’d have $doc_data[’doc_ids’] and $doc_data[’doc_weights’]. Unless, of course, I’ve completely misunderstood your code...
Hi Sottwell,
There are two arrays stored in the database that I want to retrieve. One stores the document ID and the other stores the document weight. I want to get out these details and retrieve the documents that match the id of the doc_ids in the array. I then want to sort the results according to the weights stored in the other array.
I really appreciate your help. I am very new at php.
Thank you and I look forward to hearing from you.
Sarah
-
☆ A M B ☆
- 24,524 Posts
Yes, but both arrays are stored in the same table?
And again, you say it "crashes". What is the error message?
I am not getting anything on screen. I am just getting this message in the error logs:
[Fri Nov 16 18:09:12 2007] [error] [client 132.234.220.196] PHP Parse error: syntax error, unexpected T_ARRAY, expecting T_S