I have an HTML form that builds a drop-down from json data that is retrieved dynamically on page load from a php script.
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
jQuery ....
I am wondering if MySQL's stored procedures can work with two different databases on the same machine? How about if they are on different servers?
...
Hi All.
I'm working on an application that will use .NET as the application platform. Originally, we were going to use SQL Server as the database, but after some research, MySQL came up as a popular database that is used by some high transaction based applications(i.e. Facebook, Craigslist, etc...). The app we're working on will involve ...
Hi,
I am working with a database which unfortunately has a lot of unused tables and I am trying to clean it up. I'm trying to find a way where I can be 100% confident that a particular table is no longer being used.
After some googling, I still cannot find a good way to do so. I am only able to tell the last writes to a table (INSERT, ...
Hello freinds,
i want to use the result of ifnull as a third parameter for concate().
my query is like
select x.a,
x.aa,
x,bb,
y.b,
z.c
concate(a,aa)
ifnull((select P.name from p where p.id=x.name ), N.A.) as state
concate(a,aa,state) // here it says state is ambiguous tha...
If I have a MySQL master-slave set-up and I change the schema on the master (e.g. ALTER TABLE/CREATE TABLE, etc), will those changes get replicated over to the slave?
...
Hi!
This does not work with my PHP 5.3.3 installation on WAMP / Windows 7:
mysql_connect('localhost', 'root', '');
After Maximum execution time, this error is presented:
Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:...
Hy,
I have problems with Mysql query's made between few federated tables and local tables.
With multiple joins in querys and inserts that are using one or two federated tables with two or three local tables results in time-out ....
How can this problem be resolved?Where is the problem?
Is not recomended? If not what is the best way to...
Hi guys,
I'm querying a MySQL table to get some data that I display on a php page. The problem is that the col widths are small for a few columns. Is there any-way I can specifically change those (not the rest)?
Currently, I'm doing my printing via a loop, so it seems strange to me as to how to pin-point which corresponds to the col...
Okay, here's what I'm trying to do. I have a drupal table (term_data) in mysql that lists tags and their ID numbers and a second table, (term_node) that shows the relationship between tags and the data the tags refer to. For example, if node 1 had 3 tags, "A", "B" and "C". term_data might look like this:
name tid
A 1
B 2
C 3
...
Hi,
I am trying to audit table changes on MySQL but i want the "before update" trigger to run (add a line into an audit table) only when there is at least one changed field.
Is there a way to easily check all fields for changes between OLD and NEW ?
Thank you !
...
I'm making a SQL database with MySQL.
I need a column that has only 3 possible values: "Total" "Hours" "OnDemmand". I mean that user has to select one of these three values, he will can't select another value.
How can I do it?
...
If I run the following PHP, I would expect no value to be inserted into the test table, because I have a transaction that I haven't committed:
$db = mysql_connect("localhost","test","test");
mysql_select_db("test");
mysql_query("begin transaction;");
mysql_query("insert into Test values (1);") or die("insert error: ". mysql_errror());
d...
I've got a jquery roller/scroller that displays snippets of records returned from my 'Helpful Hints' database table query. I want to keep the scroller to about 15 records but not always the first 15 records.
Is it more efficient to write a query like:
SELECT *
FROM table
ORDER BY RAND()
LIMIT n
Which returns a random result or do I ...
Are ordinary sql queries different from MS Access 2007 queries?
I have this simple query but it is not working in MS Access query (SQL View). What is wrong with this?
SELECT StudentSubject.*, Subject.*,Professor.*, Student.*, Church.*
FROM
(
SELECT StudentSubject.*, Subject.*,Professor.* , Student.*
FROM
(
SELECT StudentSubject....
We have to implement the import procedure.
The quantities of data is about 100 megabytes for one CSV files (the files already resides on server, so no upload necessary).
Any advice on whether to implement the bulk "LOAD DATA LOCAL INFILE" or row-by-row "INSERT/REPLACE" on importing data into database.
I've checked that "LOAD DATA LOCA...
Hello,
Recently ran into a problem after putting my codeiginter application into a clustered environment. Users are able to get site rewards at point levels, after they click submit to retrieve the reward I have code that grabs the current point level of the reward is at and save that in a table with the user_id and what point level the...
Here is my code so far:
SELECT `date`, title, category, url
FROM cute_news
WHERE category = '4'
ORDER BY `date` DESC
I want make pages based on the year, like, 2010 , 2009, 2008 and so on.
The database saves the date as UNIX_Timestamp. Not sure how to query a recordset with a Year parameter?
WHERE unix_timestamp(YEAR) = '2010' or som...
Hi guys,
Can anyone please tell me what is the equivalent of sp_lock, sp_who or sp_who2 in mysql server? Basically I want to know which tables are locked due to some query and which host is holding on to those exclusive locks.
Thanks in advance
...
We are developing a MySQL database (with frontend and backend) with holiday packages. We have everything figured out except for the best method to store the departure dates of the tour packages.
Some packages are available almost every day of the year; others are only available on tuesdays and wednesdays; others leave every monday betwe...