473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

only one row

Does somone know why this script
gives me only one result like this:

i want to have something like that:
---------------
select * from firma where id_firma=1->1
select * from firma where id_firma=2->2
select * from firma where id_firma=3->3
select * from firma where id_firma=4->4

THE SCRIPT GIVES ME ONLY ONE ROW. WHY?

the result:
---------------

select * from firma where id_firma=1->1
---------------

the script code :
<?

$con = odbtp_connect( 'localhost','DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=c:\\baza\\baza.mdb;UID=admin;PWD=; ');
$zap_main="select id_firma from firma";
$exec_main=odbtp_query($zap_main);
while($wiersze=odbtp_fetch_assoc($exec_main))
{

$id=$wiersze['id_firma'];
echo $zap="select * from firma where id_firma=$id";
$wyko=odbtp_query($zap);
while($wiersz=odbtp_fetch_assoc($wyko))
{
echo "->".$wiersz['id_firma'];
}
}
?>
Jul 17 '05 #1
1 1752
Kalenzo wrote:
Does somone know why this script
gives me only one result like this:
Maybe there is an error in your SQL commands?

[snip] the script code :
<?

$con = odbtp_connect( 'localhost','DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=c:\\baza\\baza.mdb;UID=admin;PWD=; ');
### do some error checking
if (!$con) die('could not connect');
###
$zap_main="select id_firma from firma";
$exec_main=odbtp_query($zap_main);
### do some error checking
if (!$exec_main) die('error in query [' . $zap_main . ']');
###
while($wiersze=odbtp_fetch_assoc($exec_main))
{

$id=$wiersze['id_firma'];
echo $zap="select * from firma where id_firma=$id";
$wyko=odbtp_query($zap);
### do some error checking
if (!$wyko) die('error in query [' . $zap . ']');
###
while($wiersz=odbtp_fetch_assoc($wyko))
{
echo "->".$wiersz['id_firma'];
}
}
?>

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
5
by: Todd Huish | last post by:
I have noticed something disturbing when retrieving datasets over a relatively slow line (multiple T1). I am looking at about 25 seconds to retrieve 500 rows via a php-odbc link. This same select...
18
by: jacob navia | last post by:
In C, we have read-only memory (const), read/write memory (normal data), and write only memory. Let's look at the third one in more detail. Write only memory is a piece of RAM that can only...
6
by: BBM | last post by:
I have an object that has a fairly complex construction sequence, so I have written a dedicated "factory" class that invokes the constructor of my object class (which does nothing but instantiate...
8
by: Bonj | last post by:
when creating a resource-only dll, the only way I can get it to compile and work correctly, is to make it a non-resource-only dll. surely this can't be the way...? basically, there is a load of...
5
by: manokumar | last post by:
hiye, i notice that some if not all of my folders in winxp pro. are set as read only and its giving me some problem with development. so as the natural thing, i unchecked the read only option and...
6
by: Samuel M. Smith | last post by:
I have been playing around with a subclass of dict wrt a recipe for setting dict items using attribute syntax. The dict class has some read only attributes that generate an exception if I try to...
44
by: Tolga | last post by:
As far as I know, Perl is known as "there are many ways to do something" and Python is known as "there is only one way". Could you please explain this? How is this possible and is it *really* a...
0
by: mkarki2 | last post by:
I am doing a likned list program in C. I am not really good at it and just started. But I am stuck how to pass structure in the function correctly. this is the driver file #ifndef DRIVER_C...
4
by: greg | last post by:
Hi, I have a read only access file with a linked table that connects to a sybase database. So I can still add data to the table even though its read only since the table is really in sybase. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.