Okay, this is probably really simple but for some reason I'm totally fried on this and need some advice.
I have two columns in my database, budget_min and budget_max.
Oh the front end, I'm trying to build a search that will find everything between two budgets, say 1000 - 2000, or 2000 - 4000.
Need something like where budget_min > 100...
What is the best way to save MySQL stored procedures and table structures in SVN?
I have around 100 tables and 200 stored procedures, dumping all procedures in a single file makes no sense as it contains thousands of lines and hard to maintain. I'm now thinking of creating separate separate files for each table and procedure, but it wi...
How do you select a field that contains only uppercase character in mysql or a field that doesn't contain any lower case character?
...
QSqlQuery query;
QString queryString = "SELECT * FROM " + parameter3->toAscii() + " WHERE " + parameter1->toAscii() + " = \"" + parameter2->toAscii() + "\"";
bool retX = query.exec(queryString);
above code when bundled as an application returns true on the machine it has been created. it returns false on other machines. how is it possi...
Hi,
I am trying to connect to the database that is hosted on my server through my local machine.
my server has cPanel 11, and it is a typical shared server, powered by CentOS, PHP and MySQL installed.
to be precise i am holding the reseller account in the same server. i want to access the database between different accounts or domai...
Hi guys,
I'm getting this error when trying to insert data from a form into a database. I know what it means, I just can't figure out why I'm getting it. Perhaps I've been starting at it for too long and have missed something?
Here is my code:
<?php
$q1 = mysql_escape_string($_POST['q1']);
$q2 = mysql_escape_s...
Hello,
I have two MySQL tables, one with categories and one with products. For the first one, I also have a column which describes the category order. What I want to do is get all the products and sort them by category (which needs to be sorted ascending according to the 'order' field) and by price (also ascending).
The tables are:
c...
I work with Workbench and phpMyAdmin with mySql, I use Procedures and Function etc...
Sometimes one procedure triggers another Function and so on... eventually something goes wrong somewhere.
Is there any tool known to anybody that can show all the queries mySql runs?
Like a command prompt that shows every command MySql runs
it would b...
Hi there,
i have a games website. in that there are more than 4000 flash games available.
Now my problem is in my website i am getting a strange popup window whenever i first open up my web site in a day that pop up appears with sometimes google, sometimes yahoo sometimes and somee other sites..i dont know how the popups are coming..
...
I have a MySQL question that I think must be quite easy. I need to return the LAST INSERTED ID from table1 when I run the following MySql query:
INSERT INTO table1 (title,userid) VALUES ('test',1);
INSERT INTO table2 (parentid,otherid,userid) VALUES (LAST_INSERT_ID(),4,1);
SELECT LAST_INSERT_ID();
As you can understand the current co...
Hello,
I am after opinions from some expert web developers as to the best solution to my problem.
THE SETUP
In my job, I look after an online shop, which is based upon osCommerce, with many additional features and tweaks. This is on Linux shared hosting and uses PHP and MySQL as its main technologies.
We are going through the process...
I am passing null to below procedure as below its is not returning any values even if data is there in the table?
call view_ads (NULL,'vehicles',9);
call view_ads ('placename',null,9);
=====================================================================================
below is the code
delimiter $$
drop procedure view_ads$$
create...
I am trying to generate a query where I want to select columns(text) matching multiple values.
eg: I have two columns, id and description. suppose my first row contains description column with value
Google is website and an awesome
search engine
, second row with description column value
Amazon website is an awesome eCommer...
Need help with PHP/MySql. Need to select all the records from 'today'.
My table has a coloumn which holds a unixtime stamp and I want to just select from the table where the unixtime stamp = today.
Happy to do this on linux command line just need to basic MySql query?
...
$sql="update users_contain
set
wood_max = (Select building_production from building_level where merge_id=$subPrimaryKey and empire_id=$user_empireID) ,
iron_max = wood_max,
clay_max = wood_max
where user_id = $user_id";
Now there is a question.
will wood_max will always be updated first than iron_ma...
insert ignore table ( field2 , name) Values ( 22 , 'value3');
its adding duplicating the value
and table strcture :
+------------------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------------+------------------+...
Hello everyone. This is my first question asked here so I apologize in advance if I break any rules.
I'm trying to get a project going on my system, I have imported the source code via GITHub, and are running it locally with WEBrick. When I do, the following error is printed:
=> Booting WEBrick
=> Rails 2.3.8 application starting on 0....
I have a table with 9 rows.
$id=5
If i use SELECT * FROM tbl WHERE id>=$id i get the 5,6,7,8,9 rows. To this query I want to add the result of SELECT * FROM tbl WHERE id<$id so I will get the final 5,6,7,8,9,1,2,3,4 rows.
This is to avoid going two times in database then add the result set in php.
EDIT: Yes order is important. Thank ...
I have this test table with one row entry and 2 indexes, the first a primary key and then a unique index for a and b columns:
CREATE TABLE IF NOT EXISTS `test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`a` int(11) NOT NULL,
`b` int(11) NOT NULL,
`c` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `a` (`a`,`b`)
) ENGINE=InnoDB...
Hi,
From phpMyAdmin, I was exporting the functions/procedures used by the user assigned to a particular database and 3 functions didnt get exported because they were created by the 'superadmin'.
I was able to see these functions within
localhost > database_name -> Structure -> Routines
BUT, I was not able to modify their structure o...