Hi
I just converted an Access Db to mysql (using Access as frontend, mysql as backend)
It is a simple, 4 table database
I have a Master table, and 3 linked tables to it
So an Access form displays has data from:
Master table (mainform)
Details1 table (subform)
Details2 table (subform)
Details3 table (subform)
The master table w...
I have problem with my MySQL query:
include '../inc/mysql_config.php';
$sql="INSERT INTO ordrar
(id, order, namn, adress, postnummer, postort, email, status)
VALUES
(NULL, '$order','$namn','$adress','$postnummer', '$postort', '$email', '$email', '$status')";
mysql_query($sql);
if (!mysql_query($sql)) { die('Erro...
This seems simple, but it is impossible to search the web for...
I have a legacy application that uses JDBC directly with no frameworks, and I'm having to add some new features. I'm having issues finding out how to use the IN() function via JDBC.
I would like to have a query like the following
SELECT * from animals WHERE animal_name ...
I have a database which will receive a whole bunch of information, but most importantly it will receive a city name for each row. Sample below:
id city
1 London
2 Manchester
3 London
4 Brighton
5 Oxford
6 Oxford
7 London
I want to SELECT only the city name from thi...
Hi,
I need to calculate the distance between two points, but not in the regular way. I need to know 'the east to west distance' + 'the north to south distance'. I guess this is more simple then the regular 'as the crow flies' calculation but i still can't figure out how to do it.
I want to do this using a MySQL query and preferably ha...
In a MySql text column there is a trademark ™ symbol which is displayed in an html textarea field and looks correct.
A change is made to the textarea data and it is submitted via jQuery. When it arrives in PHP it appears to be translated to \u2122 and gets updated in mysql that way. When that data is now retrieved to the web page it app...
I have the following code:
$query = mysql_query("SELECT * FROM activity ORDER BY activity_time DESC LIMIT 50");
while($result = mysql_fetch_array($query)) {
extract($result);
if ($activity_type == "discussion") {
$query = mysql_query("SELECT * FROM discussions WHERE discussion_uuid = '$activity_ref'");
while($re...
Hi --
I'm loading large text file of high school students into MySQL, but the school itself is only identified in the first line of each text file. Like so:
897781234Metropolitan High
340098 1001X 678 AS Reading 101KAS DOE KEITH A1 340089 A 7782...
Using SQL code, how can I generate a col...
I have a mysql database that I am trying to migrate into another database. THey have different schema's and I have written a php script for each table of the old database in order to populate its data in to the new one. The script works just fine but the problem is that it does not move all the data. for example if I have a table and all...
I have a table of answers to questions:
table questionAnswers:
user VARCHAR
question VARCHAR
answerValue VARCHAR
Important: Users can post multiple answers to questions
I want to collect how many questions a user has answered into a table:
table users
user VARCHAR
questionsAnswered INT
Important: Has to ignore ...
Consider the table of events below. The OrderID field is a foreign key to an Orders table.
OrderID EventType TimeAdded* Processed
1 ... 3 Hours Ago 0
2 ... 5 Minutes Ago 0
1 ... 2 Hours Ago 0
1 ... 1 Hour Ago ...
Hi guys.
I have 2 joined tables, each one has a primary key column named id.
SELECT t1.*, t2.* from t1 join t2 on t1.fk_id=t2.id
When I run the query above, both id fields are selected (t1.id and t2.id). My question is, how can I select the correct ID while I am looping through the result set? If I select $result->id, I will get t...
Possible Duplicate:
Dump a mysql database to a plaintext (CSV) backup from the command line.
I prefer python, but if mysqldump works...then how can I do that?
...
I have a lot of IP addresses in a large mysql DB stored as long int's. I need an efficient/quick way to convert them back to an IP within a BASH shell script ( or have mysql return the results as an IP?? ).
Note: specifically don't want to call perl, awk, or other 'language'.
...
Hello i have table
sitizen(id_citizen,name,sname,age,id_city)
i try do query
select a.name_city,b.name,b.age from city a,citizen b where a.id_city = b.id_city and
b.name = 'DAVE' order by b.age desc
expect result like this
- NY | DAVE | 65
- NY | DAVE | 12
- NY | DAVE | 3
but see result what i can't anderstand
- NY | DA...
Hi All,
A question about connecting Python To MySQL DB:
How Can I Do That ?!
Link, If You Have References or ...
...
I there a way to update data into mysql database when click on a link? I want create a comment voting system on my site so when user clicks on a "Vote for this comment" link, +1 should be sent into database...
How is that possible?
...
Hi,
SELECT user.login, book.name
FROM user
LEFT JOIN book ON
user.login = book.author
WHERE user.login = 'peter'
Now i get:
peter book1
peter book2
peter book2
Bu i wish get:
peter book1
book2
book2
Database: MySQL
Thanks
...
Env: JPA 1, Hibernate 3.3.x, MySQL 5.x
We auto generate database schema using hbm2ddl export operation. Would it be possible to generate a default value for a certain @Entity member during SQL generation. (e.g. archive field in mytable entity class.
create table mytable (
...
'archive‘ tinyint(1) default ’0 ’,
...
)
...
I am trying to insert data from a csv file into mysql using BigDump.
It stops on line 2, with the error:
"Query: INSERT INTO location VALUES
(1,"O1","","","",0.0000,0.0000,, );
MySQL: You have an error in your SQL
syntax; check the manual that
corresponds to your MySQL server
version for the right syntax to use
near '...