sorry to post it again, this matter is getting on my nerves 🙂
I try to get the datas contained in columns of a table from an ODBC link, so I can build from that a MySQL DB.
The existent converters didn't convinced me.
I can't find why I have the following problem :
the only data I get with my code is the one contained at the first row of the column I selected. I mean, in Users column, i get only one name. Here is a part of the code :
$selectedtable = odbc_exec($connectionstring,"SELECT * from [$tablename]"); //where $connectionstring is the connection id to an access 97 DB and tablename the name of a table in that DB
$numberofcolumns = odbc_num_fields($selectedtable); // number of columns in the selected table
for($i = 1; $i<=$numberofcolumns; $i++)
{
$columnname = odbc_field_name($selectedtable, $i); //get the name of the $i th column
$nomcolfilt = str_replace(' ','_',$nomcol);
$typecol = odbc_field_type($selectedtable, $i); //get its type
$longcol = odbc_field_len($tableselectionnee,$i); //get its length
$type= "".$typecol."(".$longcol.")"; //give e.g. VARCHAR(100)
$selectedcolumn = odbc_exec($connectionstring, "SELECT [$columnname] from [$tablename]");
$rc = odbc_fetch_into($cselectedcolumn, $array);
/* e.g. :*/ echo $array[2]."<br>";
-------------------------------------------------------------
this echo gives me the first row in the column, but no way to get other rows
😕
thanks by advance