I am getting a Fatal error: Using $this when not in object context in Stemmer.php on line 317.
At the moment I am using the Stemmer class which I found on the internet to change words to their stemmed version before searching the database for matches.
I have read all the related posts where people are having a similar problem. The dif...
I am trying to connect to a database using MySQL C++ Connector. I have used this code segment many times:
driver = get_driver_instance();
connection = driver->connect("tcp://127.0.0.1:3306", "user", "pass");
and it has worked successfully, but now I am getting this error thrown from this code segment:
"Unknown MySQL server host 'ÇD$Œ...
1. So if I search for the word ball inside the toys table where I have 5.000.000 entries does it search for all the 5 millions?
I think the answer is yes because how should it know else, but let me know please.
2. If yes: If I need more informations from that table isn't more logic to query just once and work with the results?
An exa...
I have this table:
I need to query the table and ask the following questions:
How many rows matching uri 'x' exist with unique IP addresses between 'y' and 'z' dates.
I was experimenting with COUNTs but I couldn't seem to get the result I needed...
...
Im using NHibernate to execute a SQL statement that first inserts a new row, then inserts a row in a different table based on the id that the first insert generated.
The SQL for it works fine:
INSERT INTO messages(MessageSubject,MessageText,MessageSenderTribeID,MessageSentTime,MessageHasAttachments)
VALUES('subject', 'text',204948, 2...
I have a source of data that I get from a webService. I can never know when it'll change and I need to store it in a DB as soon as I get it. What is the best way to make the storage solution adapt to what I put there. I am using mySQL. Would serialization be the key?
...
Hi guys! My question quite a general one.
I have to create a prototype of a query optimizer for mySQL, that works instead of standard one, or complements it. It doesn't have to be very complicated, at the beginning. But is there a way of turning off the standard optimizer, so that I can check the way how mine works? And what language is...
Hi guys, hoping you can help me on the right track to start optimising my queries. I've never thought too much about optimisation before, but I have a few queries similar to the one below and want to start concentrating on improving their efficiency. An example of a query which I badly need to optimise is as follows:
SELECT COUNT(*) AS ...
Hi all, my question is about a database history or transaction log table which is currently updated by mysql procedure. The procedure is called by mysql trigger every time when we keep a history of an appropriate table in during insert, update or delete actions. As far as we have lots of tables for each of them we need to create a separa...
There's gotta be something small I keep missing here, but I can't find it for the life of me.
$insert = mysql_query("INSERT INTO USERS
(`FBID`, `FIRST_NAME`, `LAST_NAME`, `GENDER`)
VALUES ('$fbid', '$firstName', '$lastName', '$gender')");
The error is:
Error: You have an error in your SQL syntax; check the manual that correspon...
Hi,
Is there any option in MySQL to run a scheduler job? At end of the day take some records from table1 (last 3 weeks days via sql query) and transfer to another db's table.
Please give some heads up on this.
Thanks.
...
Hi,
I have a query using the Containable behaviors in cakephp thats looks like this :
$x = $this->find('first',array('contain'=>array(
'User' => array(
'SelectionsTeam' => array('conditions' => $conditionTeamSelection,
'Team' => array(
'fields' => array('name','city','id'),
...
Hey, I think I'm going about this the wrong way, but have tried many ways, none of which give me the desired results.
Basically I have one search field which is to check multiple tables. My issue is that when, say, an item doesn't have a related person, it won't return a result for that item. Other than that it is fine. I realize the pr...
I have 3 tables the subject, student, and relation
The following are sample data
students table
id name
1 John
2 Doe
3 Jane
subject table
id subject
1 Math
2 Science
3 English
relation table
id student_id subject_id
1 1 1
2 1 3
3 2 1
4 ...
hey guys i am developing a final year location-based project(gps) in android.I have to create a server using php and mysql which contains name and location(in latitude and longitude) of important hospitals in Mumbai.The android client should be able to retrieve the the latitude and longitude of locations in mysql(external) database and t...
I'm working on a rails app that has an IPv6 model. I'm storing the IPv6 address in 2 32-bit ints and a 64-bit int:
+-----------------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+---------------------+...
Hi, thanks for looking.
I have a very long list of items, users click on an image (a plus sign) to add the item to their personal list. At the moment when they click the + it loads a "add-item.php?itemid=*" which processes the below code then redirects them to their own list, I did have it redirecting back to the global list but then it...
I have a project using C# and MySQL. I need to store permissions for a admin portal setting. There is currently 6 main permissions( read, write, view, update create...) but each of these permissions can be applied to n entities. so a user can have create, read to site a, d , f but have no permissions to the other 100+ sites. I thought of...
I have a script that loads between ~5000-8000 objects, performs some logic on them and then attempts to insert/update the MySQL table.
After about 2500 queries, the database stops executing the queries and the script just hangs with no error thrown. I need advice on what you would do in this situation. The server is a Windows box if th...
Hey, guys,
I'm trying to figure out how to select data from a MySQL table based of closeness to a number. Here's what I mean.
I'm writing an application that stores the coordinates of places (longitude and latitude) what I'd like to be able to do is select data from the database based on the location of where the user is. So, say, for ...