Hi Juma929,
I absolutely agree that JOIN can do this but that's if the two tables are in the same database I guess?
Help on iterating 2 arrays and also comparing the values?
Moderator: General Moderators
- mrvijayakumar
- Forum Commoner
- Posts: 58
- Joined: Tue Aug 18, 2009 12:39 am
- Location: Chennai city, India
- Contact:
Re: Help on iterating 2 arrays and also comparing the values?
Hello tomex1,
Brilliant question, for this, write update query with where clause to fetch record with unique primary key dear. Try it out. Come out with more questions. We can fix it..
Brilliant question, for this, write update query with where clause to fetch record with unique primary key dear. Try it out. Come out with more questions. We can fix it..
- mrvijayakumar
- Forum Commoner
- Posts: 58
- Joined: Tue Aug 18, 2009 12:39 am
- Location: Chennai city, India
- Contact:
Re: Help on iterating 2 arrays and also comparing the values?
Hi,
Replace this, and i dont kno about derby.
if($k == $v) {
//mysql_query(); //update the table 2 value by using
using query
print "EQUAL";
}
Replace this, and i dont kno about derby.
if($k == $v) {
//mysql_query(); //update the table 2 value by using
using query
print "EQUAL";
}
- mrvijayakumar
- Forum Commoner
- Posts: 58
- Joined: Tue Aug 18, 2009 12:39 am
- Location: Chennai city, India
- Contact:
Re: Help on iterating 2 arrays and also comparing the values?
If not working fine means, send me entire code to my mail box. I will check it and reply u back.
Re: Help on iterating 2 arrays and also comparing the values?
Hello,
Sorry been swamped. You definatly can use joins from different databases but im used to working primarily in MySQL / MSSQL so im not sure about Derby. It may be worthwhile taking what im saying on the matter with a pinch of salt until proven otherwise due to this.
Do a little research on Derby's join abilities, in MySQL something like the following is easily possible:
SELECT db1.table1.field1, db2.table2.field2 FROM db1.table1, db2.table2 WHERE db1.table1.field1 = db2.table2.field2 ETC...
Thanks
Sorry been swamped. You definatly can use joins from different databases but im used to working primarily in MySQL / MSSQL so im not sure about Derby. It may be worthwhile taking what im saying on the matter with a pinch of salt until proven otherwise due to this.
Do a little research on Derby's join abilities, in MySQL something like the following is easily possible:
SELECT db1.table1.field1, db2.table2.field2 FROM db1.table1, db2.table2 WHERE db1.table1.field1 = db2.table2.field2 ETC...
Thanks
Re: Help on iterating 2 arrays and also comparing the values?
Hi Juma929,
Thanks. I definitely will have a look at Derby's join capabilities.
Cheers
Thanks. I definitely will have a look at Derby's join capabilities.
Cheers
Re: Help on iterating 2 arrays and also comparing the values?
Hi mrvijayakumar,
your code does works!!!
Thanks
your code does works!!!
Thanks