PEAK XOOPS - mysql_query() error in englishin japanese

mysql_query() error

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2006/6/18 0:58
gruessle  企霹始   Posts: 8
Hello,

I am getting following error from protector.
Warning: mysql_query(): You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXPLAIN conf_name,conf_value FROM ty_config WHERE conf_title li in /home/vmc/public_html/x/modules/protector/class/protector.php on line 44


When I add EXPLAIN after SELECT the error becomes like this:
Warning: mysql_query(): You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXPLAIN conf_name,conf_value FROM ty_config WHERE conf_title li in /home/vmc/public_html/x/modules/protector/class/protector.php on line 44

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/vmc/public_html/x/modules/protector/class/protector.php on line 45

When I run the QUERY in phpmyadmin I get no errors and it works fine.

SELECT *  FROM `ty_config` WHERE `conf_title` LIKE '_MI_PROTECTOR%'

You can check the error at
http://www.vmclinks.com/

Thank you

Gruessle
Votes:14 Average:5.71
Previous post - Next post | Parent - Children.1 | Posted on 2006/6/18 4:06
gruessle  企霹始   Posts: 8

I disabled the protector from mainfile.php and deactiveted the module.

My site is back up running with out the protector now.

I still like to use the protector. If you can tell me what I need to do to make it work.

Thanks
Votes:7 Average:1.43
Previous post - Next post | Parent - Children.1 .2 | Posted on 2006/6/18 6:34
skalpa  企霹始   Posts: 4
you shouldn't have done that....

This is just an informative message generated by MySQL and meant to tell developers that their DB structure could be more optimized, nothing really serious.

If disabling the debug_mode doesn't make the message disappear, you can remove it by setting the PHP config value mysql.trace_mode to Off.
If you don't have access to php.ini do it by adding the folliwing line to .htaccess in the root of your site:
php_flag mysql.trace_mode off
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/6/18 23:26
gruessle  企霹始   Posts: 8


This worked

Thank you
Votes:15 Average:5.33
Previous post - Next post | Parent - Children.1 | Posted on 2006/6/20 6:12
GIJOE  黎扦烦菱   Posts: 4110
hi skalpa.
It is also a useful information to optimize SQL for module developpers.

Thank you!
Votes:8 Average:10.00

question Re: mysql_query() error

msg# 1.1.1.2.1
Previous post - Next post | Parent - No child | Posted on 2006/6/20 9:24
skalpa  企霹始   Posts: 4
Quote:
hi skalpa.
It is also a useful information to optimize SQL for module developpers.

Yes, in fact I didn't know about this option before I read this post... so I searched the internet to see how I could enable it on my own work installs

No need to thank
Votes:9 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!