Database error in phpInv: Invalid SQL: SELECT prop.itemid,item.categorytitleid FROM phpinv_item AS item,phpinv_property AS prop WHERE property REGEXP "" AND item.itemid=prop.itemid AND categorytitleid='2' LIMIT 0,30
mysql error: Got error 'empty (sub)expression' from regexp
mysql error number: 1139
Date: 10.01.2004 @ 20:52
Script: /inv/search.php?keyword=Cisco&categoryid=2&hash=d79307f9b9702eafad2d8a5fc22ed26c&action=+Search+
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, I figured out the problem. I did not have register_globals turn on in my php.ini . For some reason I thought that it had been recoded to not use it. Problem solved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I get the same error, it definately isn't an empty querie as I know I typed something in. I tried to search for some data I know was there as there's only one record in the DB at present while I iron these things out.
Help?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I try to search I get this:
Database error in phpInv: Invalid SQL: SELECT prop.itemid,item.categorytitleid FROM phpinv_item AS item,phpinv_property AS prop WHERE property REGEXP "" AND item.itemid=prop.itemid AND categorytitleid='2' LIMIT 0,30
mysql error: Got error 'empty (sub)expression' from regexp
mysql error number: 1139
Date: 10.01.2004 @ 20:52
Script: /inv/search.php?keyword=Cisco&categoryid=2&hash=d79307f9b9702eafad2d8a5fc22ed26c&action=+Search+
You have no search criteria
I'm getting the same error.. a PHP version problem perhaps?
Has anyone been able to fix this, I have the same problem with php 4.3.4
I know :) It's because of an empty REGEXP. You have to search for
something. An empty keyword gives this error.
Well, I figured out the problem. I did not have register_globals turn on in my php.ini . For some reason I thought that it had been recoded to not use it. Problem solved.
I get the same error, it definately isn't an empty querie as I know I typed something in. I tried to search for some data I know was there as there's only one record in the DB at present while I iron these things out.
Help?
Further to that, I checked my php.ini and register_globals is set to "ON"......
Any other ideas?
Add the following two lines to inc/variables.php
isset($_GET['keyword']) ? $keyword = $_GET['keyword'] : $keyword = $_POST['keyword'];
empty($_GET['keyword']) ? $keyword = '.' : $keyword = $keyword;
This should solve the problem of the empty search and the register_globals being off. Hope everything is shiny