I am trying to use some variables in a creation script for database setups. I am not exactly sure how to use them. Please explain how to properly format my code. Below is the code I try, and the error I get:
SET @username = 'xxxx'; -- store number goes here
SET @password = 'xxxxxx'; -- store password goes here
CREATE TABLE IF NOT EXIST...
I will use mysql as a database choice with my java. What is the best way to learn it quickly and become productive super fast... well I am jsut trying to learn it as I am working on the project involving it. I my goal is
to be able to create/administer/design tables for Mysql database
program in Java against it (with tomcat)
Thank...
Disclaimer: I'm very new to SQL and databases in general.
I need to create a field that will store a maximum of 32 characters of text data. Does "VARCHAR(32)" mean that I have exactly 32 characters for my data? Do I need to reserve an extra character for null-termination?
I conducted a simple test and it seems that this is a WYSIWYG ...
I'm trying to create a Database Connection to ODBC data sources in SPD 2007 and am having absolutely no luck. I've had some success using an SqlDataSource control, however. I don't know if SPD's database connection support is just broken or what. Googling has turned up others having issues but no definitive answers.
So, my two data s...
I created user 'restriceduser' on my mysql server that is 'locked down'. The mysql.user table has a N for all priveledges for that account. The mysql.db table has Y for only Select, Insert, Update, Delete, Create, Drop; all other privileges are N for that account. I tried to create a stored procedure and then grant him access to run o...
Let's say we have this table:
Symbol | Size
A | 12
B | 5
A | 3
A | 6
B | 8
And we want a view like this:
Symbol | Size
A | 21
B | 13
So we use this:
Select Symbol, sum(Size) from table group by Symbol order by Symbol ASC
But instead we get this:
Symbol | Size
A | 12
B | 5
What am I...
Does anyone have or know where I can get a version of the ASP.NET bundled database ASPNETDB.mdf for MySQL?
Thanks :)
...
I have a table with 2 columns:
nid realm
1 domain_id
1 domain_site
2 domain_id
3 domain_id
I want every entry to have 1 entry for domain id, and 1 for domain site. So I want to end up with:
nid realm
1 domain_id
1 domain_site
2 domain_id
2 domain_site
3 domain_id
3 domain_site
If I was doing this in PHP, I'd ju...
I want to create a simple auditing system for my small codeigniter application such that it would take a snapshot of a table entry before the entry has been edited.
One way I could think of would be to create a for example news_audit table which would replicate all the columns in the news table and create a new record for each change w...
Hello,
I have a MySql table whose primary key is a 64bit BigInt
I'm using Zend_Db (Zend Framework 1.8.4) to insert a new row, then call lastInsertId() to retreive the new row's id, what I get back is a super large number such as 18446744072633694008, and this number changes from time to time, but always this large. the auto increment ...
Hi All. I am creating a web site using php, mysql and zend framework.
When I try to run any sql query, page generation jumps to around 0.5 seconds. That's too high. If i turn of sql, page generation is 0.001.
The amount of queries I run, doesn't really affect the page generation time (1-10 queries tested). Stays at 0.5 seconds
I can't f...
I'm attempting to clean up data in this (old) spreadsheet and need to remove things like single and double quotes, HTML tags and so on. Trouble is, it's a 3000 row file with 25 columns and every spreadsheet app I've tried (NeoOffice, MS Excel, Apple Numbers) chokes on it. Hard.
Any ideas on how else I can clean this thing up for import ...
A website that I co-own has been asked us to add some content to our site which is great advertising for us. The catch is that because of the nature of our company, we have to be very careful about who has access to our site. (We distribute music for labels to radio stations)
Following so far?
So I have started a new page for the conte...
Below is some example code of how I run my mysql queries, I run them through a function which I think would maybe simpliy switching databases.
Below is an example of a mysql query I run and below that is the actual function.
Would it be difficult to change to a different database type like oracle or some other if I ever decided to usin...
I found the following code on mysql forge site.
MySQL Proxy : An easy way to log all warnings and errors into a MySQL table.
http://forge.mysql.com/tools/tool.php?id=133
This may sound too basic, but from where do I start if I need this functionality.
...
I run XAMPP,
a few days back i had set up a password for the root password through phpmyadmin
I am not able to access phpMyAdmin ever since that moment
I followed help on this link but everything seems fine there (in config.inc.php). I even tried unistalling xampp fully, restarting windows and then reinstalling xampp, but still pointing...
Looking for general pointers to optimize my current settings to get faster query time.
I am already working on explaining my queries and working out indexing, I am just looking for advice on system variables for Windows Vista.
Here are all the current settings that are not 0, NULL, Off or Blank:
Bytes_received 286
Bytes_sent 554
Com_...
Hiya,
I have another problem with sql queries running as I expect in PHPMyadmin, but when I add the sql to my PHP script, it does not work as expected.
This is the formula of my sql:
select DISTINCT
table1.id AS ID,
table1.title AS Title,
table1.startdate AS StartDate,
table1.enddate AS EndDate,
...
I have problem with mysql_num_rows() function. I've checked query (it has proper syntax and I'm getting the result in sql) and connection to database and everything seems to be able to work.
// some code here, connecting to database and working query to db
$query = "SELECT ff_client.email FROM ff_order, ff_client WHERE ff_order.id = '$o...
I have the following query:
SELECT `masters_tp`.*, `masters_cp`.`cp` as cp, `masters_cp`.`punti` as punti
FROM (`masters_tp`)
LEFT JOIN `masters_cp` ON `masters_cp`.`nickname` = `masters_tp`.`nickname`
WHERE `masters_tp`.`stake` = 'report_A'
AND `masters_cp`.`stake` = 'report_A'
ORDER BY `masters_tp`.`tp` DESC, `masters_cp`.`punti` DESC...