Program working well in localhost,but not in the internet!
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: Program working well in localhost,but not in the interne
From a PHP5 Local server to a PHP4 Production server with different extensions loaded...manikandan wrote:After modifying i upload that file into web server. That modified page alone not working well, i mean that page displays HTML content alone,it didn't fetch the data from DataBase.
Ok, post your database connection code (without your database login credentials please) so I can see something in it. PLEASE DO NOT POST YOUR MYSQL USERNAME OR PASSWORD!
-
manikandan
- Forum Newbie
- Posts: 10
- Joined: Sat Oct 07, 2006 1:43 am
Dear Mr Volka & Everah ,
Thanks a lot. I have found the problem using Mr.Volka's error handling code.
and
This error handlig code reports that the server side mysql version cannot process the complex query like this(below the complex query),
I would like to say thanks to Dev forum network and all the peoples who all are contributory and help me to come out from this problem.
Once again Thanks to Mr.Volka & Mr.Everah,
Thanks and Regards,
Manikandan S,
Mumbai-India.
Thanks a lot. I have found the problem using Mr.Volka's error handling code.
Code: Select all
$db = mysql_connect(,,) or die(mysql_error())
mysql_select_db(,$db) or die(mysql_error());
$query = '...';
$result = mysql_query($query, $db) or die (mysql_error());
if ( 0==mysql_num_rows($result) ) {
echo 'no results';
}Code: Select all
$result = mysql_query($query, $db) or die (mysql_error());
echo "\n<div>Debug: ", mysql_num_rows($result), " records found.</div>\n";Code: Select all
$sql="(Select c_colori.cod_parte as code,c_colori.descr_parte FROM c_colori INNER JOIN ordini2 ON (c_colori.cod_parte=ordini2.cod_art AND ordini2.bu='".$name."') )UNION (select c_colori.cod_parte,c_colori.descr_parte FROM c_colori INNER JOIN ordini3 ON (c_colori.cod_parte=ordini3.cod_art AND ordini3.bu='".$name."')) UNION (select c_colori.cod_parte,c_colori.descr_parte FROM c_colori INNER JOIN magazzino_transito_1 ON (c_colori.cod_parte=magazzino_transito_1.cod_art AND magazzino_transito_1.bu='".$name."') )order by code;";Once again Thanks to Mr.Volka & Mr.Everah,
Thanks and Regards,
Manikandan S,
Mumbai-India.
hm weird. complex yes but "cutting edge mysql technology"?manikandan wrote:This error handlig code reports that the server side mysql version cannot process the complex query like this(below the complex query),Code: Select all
$sql="(Select c_colori.cod_parte as code,c_colori.descr_parte FROM c_colori INNER JOIN ordini2 ON (c_colori.cod_parte=ordini2.cod_art AND ordini2.bu='".$name."') )UNION (select c_colori.cod_parte,c_colori.descr_parte FROM c_colori INNER JOIN ordini3 ON (c_colori.cod_parte=ordini3.cod_art AND ordini3.bu='".$name."')) UNION (select c_colori.cod_parte,c_colori.descr_parte FROM c_colori INNER JOIN magazzino_transito_1 ON (c_colori.cod_parte=magazzino_transito_1.cod_art AND magazzino_transito_1.bu='".$name."') )order by code;";
what mysql version do you use on your server?
In case of doubt
Code: Select all
<?php
$db = mysql_connect('localhost', '...username...', '...password...') or die(mysql_error());
echo 'server version: ', mysql_get_server_info($db);
?>-
manikandan
- Forum Newbie
- Posts: 10
- Joined: Sat Oct 07, 2006 1:43 am
UNION wasn't implemented in mysql 3.manikandan wrote:MySQL Version:
Server:
MySQL 3.23.54
3.23.54 was released ~4 years ago
and is not up-to-date for quite a while.http://dev.mysql.com/doc/refman/4.1/en/news.html wrote:D.3.6. Changes in release 3.23.54 (05 December 2002)
Also note
http://downloads.mysql.com/archives.php?p=mysql-3.23&v=3.23.54 wrote:MySQL is discontinuing support of this release on 31 July 2006 according to our support lifecycle policy announcement. MySQL Network subscribers and OEM customers will continue to be supported until 31 Dec 2006.
-
manikandan
- Forum Newbie
- Posts: 10
- Joined: Sat Oct 07, 2006 1:43 am
Dear Mr.Volka,
I really gets lot of the information from you. And i have visited the URL you mentioned. I would like to say thanks for your valuable commitment with me. Thanks a lot. Please tell me wheather i continued with that MySQL server 3.23.54 or else i have to change my version?
Thanks & Regards,
Manikandan
I really gets lot of the information from you. And i have visited the URL you mentioned. I would like to say thanks for your valuable commitment with me. Thanks a lot. Please tell me wheather i continued with that MySQL server 3.23.54 or else i have to change my version?
Thanks & Regards,
Manikandan
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
-
manikandan
- Forum Newbie
- Posts: 10
- Joined: Sat Oct 07, 2006 1:43 am