mysql views and many queries(select) do the same job ?
May reference fields from 2 or more mysql queries(select) same time using two
$row = mysql_fetch_row($result);
$row1 = mysql_fetch_row($result1);
$x = $row[1];
$x1 = $row1[1];
??????
Printable View
mysql views and many queries(select) do the same job ?
May reference fields from 2 or more mysql queries(select) same time using two
$row = mysql_fetch_row($result);
$row1 = mysql_fetch_row($result1);
$x = $row[1];
$x1 = $row1[1];
??????
Your code makes sense, but I don't think many people know exactly what you are asking. Could you elaborate more?
I mean rather than using "mysql views" I can use two SELECT queries ? It;s the same ?
Sorry, but that is actually less clear and more vague than your first post. The more I go over your post the more sure I am that I don't know what you are asking. Do you want to search multiple tables, columns at the same time? do you want to concatenate? Do you want to combine the results of two queries? We need a lot more information. Examples would also help. It does not have to be code, but code helps too.
I mean rather than using "mysql views" to join two SELECT queries(two tables) using common fields PK=FK ,
CREATE VIEW Name_View (alias names _ same in number as fields of view_comma separated) AS
SELECT TABLENAME1.FIELD1, TABLENAME1.FIELD3, TABLENAME1.FIELD5, TABLENAME2.FIELD1, TABLENAME2.FIELD6, TABLENAME2.FIELD7
FROM TABLENAME1, TABLENAME2
WHERE TABLENAME1.FIELD1 = TABLENAME2.FIELD1;
I can use two SELECT queries SEPARATE and mixed refer to the fields of the two queries ? It's the same ?