How to return a select result with batches through a single query, that should be a straight forward compound select somehow. Below is a sample table and a simple query that will generate the desired result by currently using a temporary numeric column that could not work in the final real world process.
There are only two key columns ...
I'll avoid any explanations and just get to the question. Is there a way to accept multiple data types for one parameter of a MySQL stored procedure?
I want to be able to accept both int and varchar-typed data for an IN parameter of the procedure. Is this possible?
I know this is not good practice (I'd never choose to do it myself) but...
I did a succesful migration from MySql to Sql Server using the migration tool.
Unfortunately for some reason it labels the tables database.DBO.tablename instead of just database.tablename
I have never used Sql Server so perhaps this is just the way they name their tables.
When I do:
SELECT TOP 1000 [rid]
,[filename]
,[qc...
i have about 10 scientists writing to a mysql database
i have migrated to sql server and now i have to deal with OWNERS
does it matter which owner i choose? when i do automate migration frmo mysql to sql server it assigns DBO. is that OK? should i continue to use that?
so now i have to do:
SELECT TOP 1000 [rid]
,[filename]
...
Just for an example. How can I query my db to find two users who might be using the same phone number? I'm not inputting a specific number but I want to find all instances phone numbers that are being used more than once in the user table.
...
I am creating an application which will store a (semi) real-time feed of a few different scales around a certain location. The weights of each scale will be put in a table with only as many rows as scales. The scale app feeds the MySQL database a new weight every second, which a PHP web app reads every 3 seconds. It doesn't seem like ...
Hello,
Is there a way to search MySQL database for similar words (mean not identical words) . For example : user searches in database for word "abcd" and there is a word "abd" in the database so the search engine or the program Ask the user "Do you mean [abd] ? " as in most of search engines in the web ? Please notice that the search wor...
Using a site like StackOverflow as an example:
I have a table of users, questions, and user-questions mappings. My user-questions mappings table looks like this:
userID (int 8)
questionID (int 8)
When displaying a list of popular questions, I am trying to mark the questions that have been posed by the logged-in user. Is it more effic...
Hi. I have wondered for a while now how to this. If I want to take weekly backups of all or many of my tables that stores values that changes every day in mysql. I also want to execute daily functions with php that update update values in my db.
I was thinking of making a stock investing function. Where I have fictional data as the val...
Please scroll down to the "25/08/2010 Update".
I have a query which I have turned into a view. It runs very slowly because (as far as I understand) there are several issues with indexes on the joined tables.
explain select * from view_ed_abc_print
As you can see, I have table "a" using where, temporary and filesort with 4659 ro...
I have called a function from a class to find all the items related to a particular ID in a many to many HABTM relationship.
Procedures -> Tasks with a join table: procedures_tasks
I call the information like @example = Procedure.get_tasks(1,1)
I would like to be able to iterate through the data returned so that I can create an i...
the data will be stored in a mysql database like this:
5911 CD $4.99 Eben, Landscapes of Patmos {w.Martin Lenniger, percussion}; 2 Choral Phantasies; Laudes. (All w.Sieglinde Ahrens, organ)
5913 CD $5.99 Turina, Sevilliana; Rafaga; Hommage a Tarrega; Sonata. Rodrigo, 3 Piezas Espanolas; En Los Trigales; Sarabande Lointaine. ...
I am trying to come up with a function that will output a list of usernames in wp_users ordered by their post count. Right now I am able to get all users, and I am able to get post counts for individual users, but I am having a difficult time combining those two sets of data. any help would be greatly appreciated!
I'm thinking I will ne...
I want a procedure that will create a table something like this...
call createTable("test.customers", 3);
It should generate the following create table statement.
create table test.customers(
column1 varchar(1000),
column2 varchar(1000),
column3 varchar(1000)
);
In other words, a table name and the number of columns will be...
I have a script that displays categories but I want the script to display only certain categories that the user picked which can range from 1 to many categories. What do I need to do to my script to fix this problem? An example would help out a lot.
Here is my PHP script.
function make_list ($parent = 0, $parent_url = '') {
global ...
Hi,
We have a java portal connected to a mysql db containing about 70 tables.
When we prepare a new client on it, we test it on a DEV server and if all work good
we DO THE SAME configuration on PRODUCTION.
Well, we want to build some simple tool to EXPORT this configuration from DEV and IMPORT it to PRODUCTION. (to avoid doing it by h...
I have a database with two tables, Users and Posts. I'd like to write a php script to list, in order, the top 20 usernames with the number of posts they've made. The username field is cUsername in the Users table. The Users table intUserID field and the Posts table's intPosterID field correspond to eachother.
Any help would be much appr...
Please i have asked this question before, hopin to get responses this time
I created a simple comment wall that submits using ajax.
Using javascript i collect user input:
var sharetxt = encodeURIComponent(document.getElementById("cw_share_txt").value);
then pass it to a php page, on the php page, i collect the passed data:
$text=n...
HI everyone i tried for 3 days and i'm not able to solve this problem. This is the codes and i have went through it again and again but i found no errors. I tried at a blank page and it worked but when i put it inside the calendar it has the syntax error. Thanks a million for whoever who can assist.
/** QUERY THE DATABASE FOR AN ENTRY F...
I have a tree in my database described using id and parend id. Because of historical( original programmer) reasons the id is strings. I need to convert the id to auto increment integer field and keep the structure the same. How do I do that?
I'm using mysql.
...