I have a problem here that I simply cannot figure out. Every "array" returned by mysql_fetch_assoc has the value of 1.
I have included a majority of my code (it is slightly complex, so I have offered an explanation below) because I don't know if any solr actions could possibly affect any mysql_* actions.
$server_details = array(
'hostname' => SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
);
//connect to mysql database
$db = 'name';
$db_connect = mysql_connect('localhost:3306', $db, getPassword($db));
$mysql_select_db($db, $db_connect);
$query = "SELECT * FROM table ORDER BY value ASC;";
$result = mysql_query($lss_query, $db_connect);
while($row = mysql_fetch_assoc($result))
print_r($row);//this prints out all of my data, not ones.
//connect and make query for solr database
$solr_client = new SolrClient($server_details);
$solr_query = new SolrQuery();
$solr_query->setQuery('*:*');
//decide size of discretizations of solr and mysql databases
$query_interval = round(mysql_num_rows($result) / 10);
$counter = 0;
$solr_query->setRows($query_interval);
while($counter < mysql_num_rows($result))
{
$sql_array = array(array());
$base_counter = $counter;
//query solr
$solr_query->setStart($counter);
$solr_response = $solr_client->query($solr_query);
$solr_result_xml = $solr_response->getResponse();
mysql_data_seek($result, $counter);
while($row = mysql_fetch_assoc($result) && ($counter < $base_counter + $query_interval))
{
$counter++;
print_r($row); //prints out a single 1 for each row
//push each mysql into a 2-d array for further processing
array_push($sql_array, $row);
}
//this function changes nothing
generic_function($solr_result_xml, $sql_array);
print_r($sql_array); //prints out a bunch of 1's
unset($sql_array);
}
It is possible there are other errors, but please contain answers to the question at hand. I have not finished debugging because of this problem and haven't found those problems yet, if there are any.
Thanks