- <?php
-
-
//Define your database connections and select your database want to use. In this example I use two connections and two DBs. But you can use more than two.
-
-
//MySQL Server 1
-
$dbhost1 = "localhost";
-
$dbuser1 = "root";
-
$dbpassword1 = "";
-
$db1 = "mediteam";
-
$connection1 = mysql_connect($dbhost1,$dbuser1,$dbpassword1) or die (mysql_error());
-
mysql_select_db($db1,$connection1);
-
-
$db2 = "mediteam_medical";
-
$connection2 = mysql_connect($dbhost1,$dbuser1,$dbpassword1) or die (mysql_error());
-
mysql_select_db($db2,$connection2);
-
-
//The SQL statement
-
//$sql =" SELECT mediteam.mediteam_area.Area_name AS field1, mediteam_medical.mediteam_medical_medical.fieldname2 AS field2 FROM mediteam.mediteam_area,mediteam_medical.mediteam_medical_medical";
-
-
$sql =" SELECT mediteam.mediteam_area.Area_name AS, mediteam_medical.mediteam_medical_medical.fieldname2 AS field2 field1 FROM mediteam.mediteam_area,mediteam_medical.mediteam_medical_medical";
-
-
//Execute query and collect results in $results
-
$results = mysql_query($sql);
-
-
//Print result until end of records
-
while($rows = mysql_fetch_array($results)){
-
print $rows["field1"]." | <br>";
-
}
-
-
?>
this warning occur and record not display
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\MediTeam\Medical\a.php on line 26
2 1246
your query fails because of an SQL syntax error.
with a little formatting, it becomes obvious: - SELECT
-
mediteam.mediteam_area.Area_name AS,
-
mediteam_medical.mediteam_medical_medical.fieldname2 AS field2 field1
-
FROM
-
mediteam.mediteam_area,
-
mediteam_medical.mediteam_medical_medical
Sign in to post your reply or Sign up for a free account.
Similar topics
by: prashna |
last post by:
Hi all,
I am new to C and I am working on some simple programs.I am getting
the following warning which I am not able to find what it is, please
let me know what is causing this warning.Also What...
|
by: blackswift |
last post by:
hello ,all
i got this warning:
under emacs using GCC 4.0.1 gpp(DJGPP) compiler:
gpp -Wall -g lizards.cpp
Invalid keyboard code specified
lizards.cpp: In function 'int maxflow(int (*), int,...
|
by: rdufour |
last post by:
Dim Myfiles() as string
Myfiles(0) = "filename1"
I get a warning on line myfiles(0)=.. that myfiles has been used before it
has been assigned a value a null exception may occur. Obviously this is...
|
by: srikar |
last post by:
Hi in C
can any one suggest me the way in which the array of structures
needs to be declared , with out mentioning the size of the array.
eg like
static struct rwtable { /* reserved...
|
by: Heinrich Pumpernickel |
last post by:
what does this warning mean ?
#include <stdio.h>
int main()
{
long l = 100;
printf("l is %li\n", l * 10L);
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
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...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |