0

Hello!

i have a very simple query:

SELECT * FROM fornitori ORDER BY ragSociale

this works perfectly in localhost on my PC (windows 7 pro-apache 2.2.17-mysql 5.1.54-PHP 5.3.4) but on my VPS doesn't work and it give me a query error without number or error description (VPS: centOS 5.5-apache 2.2.16-mysql 5.1.48-PHP 5.3.2) !!!! why????

3
Contributors
7
Replies
8
Views
6 Years
Discussion Span
Last Post by emulman
0

Use the mysql command line interface to get at the error message. Or use the mysql_error() function in PHP.
Check upper/lower case in table names.

0

Use mysql_error() to display an error with PHP. Or run this query in phpMyAdmin or MySQL command. Post the error message here for more help.

Does this table exist on your VPS?

0

i have used mysqli and i have added this line (using PHP OOP) to check what to do when there is an error (into a class function):

echo $this->message('Query Error: ' . $mysqli->errno . '\nQuery: ' . $sql . '\n\nError: ' . $mysqli->error);

which shows all the information on errors. while in localhost it's all ok on my VPS i receive this error:

/---------------------------------------------------\
|Query Error: |
|Query: SELECT * FROM fornitori ORDER BY ragSociale |
| |
|Error: |
\----------------------------------------------------/

i have also tried the query in phpmyadmin in localhost and on VPS and both the query works!!!!

Edited by emulman: n/a

0

It means there is no problem with the query. The problem may be the way you are displaying results.

0

It means there is no problem with the query. The problem may be the way you are displaying results.

it can be..but why it happens only on the VPS? i have checked the character set too, both are in utf8_generali_ci

0

incredible..i have tried the webapp using this script on a web server online with PHP 5.2.14 and MySQL 5.1.48 and it works!!! perhaps there is some bug in the PHP 5.3 and mysqli ?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.