I'm worked with linux, use oracle 10g XE and instantclient version 11_2.
I'm make the table:
- Code: Select all
create table directions (id number PRIMARY KEY, name varchar(40));
And wrote some script for this table:
- Code: Select all
$stid = oci_parse($con, 'SELECT * FROM directions');
oci_execute($stid);
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS))
{
foreach ($row as $item) {
echo $item;
}
}
Everything work good!
After thet i mike a one new table:
- Code: Select all
create table stations (id number PRIMARY KEY,name varchar(255),direction_id number,FOREIGN KEY (direction_id) references directions (id));
and use next script:
- Code: Select all
$stid = oci_parse($con, 'SELECT * FROM stations');
oci_execute($stid);
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS))
{
foreach ($row as $item) {
echo $item;
}
}
And $row is empty....What problems???Maybe with linking field??
please help me)
