I implemented MySQL fulltext search and worked perfect.
Now the client wants that partial matches be found by the search, for example the term 'base' should match 'database'.
I know the whole idea of fulltext search is based on word delimiters, and searching for full words.
I know I most likely will have to use an undesirable LIKE '%$ter...
I'm about to code a php/mysql platform that does the following:
Admin panel
User registration
Paypal payment processing
Paypal subscription handling via api so that the user doesnt have to have a paypal account
Does something like this already exist that I can use?
If nothing exists like this, I'm going to code it fresh in the zend ...
I have a sql like this:
SELECT *, count(*) as cc
FROM manytomany
GROUP BY aid, bid
ORDER BY cc DESC
which return all records with the count #.
however, what can I do if I only want to get the ones with count > 1?
...
I've read about a few alternatives to MySQL's ORDER BY RAND() function, but most of the alternatives apply only to where on a single random result is needed.
Does anyone have any idea how to optimize a query that returns multiple random results, such as this:
SELECT u.id,
p.photo
FROM users u, profiles p
WHER...
Ok, I'm done.
I can't understand why I got this error with:
rake features
It cant' be I can't connect to mysql cause the:
rake db:migrate
works perfectly.
I keep having this error:
rake features --trace
(in /Users/myname/Projects/rails_app)
** Invoke features (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_...
When should I use a composite index in a database?
What are the performance ramification by using a
composite index)?
Why should I use use a composite index?
For example, I have a homes table:
CREATE TABLE IF NOT EXISTS `homes` (
`home_id` int(10) unsigned NOT NULL auto_increment,
`sqft` smallint(5) unsigned NOT NULL,
`year_bui...
In firefox you can see M of 𝑴 but can not see in IE8.
HEX is f09d91b4
And google can convert it to M from %F0%9D%91%B4.
Only see two blank square in notepad.
who know why?
...
I have two separate SELECT statements:
SELECT VCe.VId FROM `VCe` WHERE `YId` = 9007 AND `MaId` =76 AND `MoId` = 2851
SELECT r_pts.p_id FROM r_pts WHERE r_pts.v_id IN (57202, 57203, 69597, 82261, 82260, 69596, 69595, 82259)
When they are run separately they both complete in under .05sec however when I nest the first one within the sec...
I can not save the character 𝑴 in my mysql which encoding is utf8, but i found stackoverflow can save it and display it.
I made a mistake. stackoverflow also can not save 𝑴 .
...
I'm trying to create a MySQL statement that will sort by a value calculated within the statement itself. My tables look like this:
posts
+----+-----------+--------------+
| ID | post_type | post_content |
+----+-----------+--------------+
| 1 | post | Hello |
| 2 | post | world |
+----+-----------+-------------...
I'm using heredocs for a php/mysql insert statement on godaddy. When the function is called the page refreshes correctly, however, the data is not being inserted into the database and no errors are appearing. I've tested locally using MAMP and when the file is uploaded to the server it does not work. Has anyone had this issue before o...
You wanna test a GROUP BY on some sample data in the browser without having to install a DB engine and you don't have a remote access to any cloud database?
Yeah, me too. Let's say it is for educational purposes. MSSQL or MySQL flavoured SQL would be nice.
...
Given a datetime column in mysql 5, I want to find out the day of the week ?
But the function DAYOFWEEK returns 1 for Sunday.
I want 1 to denote monday, 2 tuesday etc.. and 7 to denote Sunday.
Is there a one-liner (that can be embedded in a larger SQL statement) that implements this function ?
f(x) => y
such that:
f(1) = 7
f(...
I have a table with an auto_increment field and sometimes rows get deleted so auto_increment leaves gaps. Is there any way to avoid this or at the very least write an sql query that
a) alters the auto_increment value to be the max(current value) + 1
and
b) return the new auto_increment value?
I know how to write part a and b but can I ...
Hi My fellow geeks
I am trying to write a php script that take a text file break down its contents and and insert it into a MySql database, the code is as follows:
$file = "my_file.txt";
$db = "db_name";
$link = mysql_connect("localhost","root");
if(!$link) die("Connection Failed");
mysql_select_db($db) or die("Could not open ...
in porting data from one mysql database to other .. there have come some errors like appostrophe's have got converted into †.. in a field called story . why did this happen and what should i do now to correct the new database.
i have only the phpmyadmin access of the two databases
...
what is the mysql command to remove all occurances of some charachter like †in particular collumn of tableA in databaseA . this collumnn is a text area collumn whose each row contains a paragraph of text.
...
Hi
ist there a way to merge two tables in MySQL virtually so I could query and insert data?
(which is basicly splitted)
exp.
table
id
active
foo
table_meta
table_id
language
text
what I like to do is using something like this instead of sql-join
INSERT INTO table_join SET active = 1, language = 'en';
regards
jim
...
how to duplicate a mysql table along with data using phymyadmin
...
Hiya,
I'm building a reporting app, and so I'm crunching an awful lot of data. Part of my approach to creating the app in an agile way is to use SQL views to take the strain off the DB if multiple users are all bashing away.
One example is:
mysql_query("CREATE VIEW view_silverpop_clicks_baby_$email AS SELECT view_email_baby_posit...