Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
if i write query like this
SELECT student.name, class.subj
FROM student
INNER JOIN class
ON student.class_id = class.class_id;
in MySql so how i can write for mongoDB script ?
MongoDB does not support joins because join operations make database response slower. You should change your thinking style while designing a database. If you use your documents together, it is suggested to make them embedded documents. Here is a tip for designing based on relations :
http://docs.mongodb.org/manual/applications/data-models-relationships/
Some of data modeling documents are below :
http://docs.mongodb.org/manual/data-modeling/
http://www.toadworld.com/platforms/nosql/w/wiki/349.mongodb-data-modeling.aspx#Collection
http://highlyscalable.wordpress.com/2012/03/01/nosql-data-modeling-techniques/
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to populate my MSSQL database, so, I will run some procedures with random data. I have to get the parameters of every SP. How I can do that?
Thanks.
You can find it with simple query -
SELECT p.name
FROM sys.objects o
INNER JOIN sys.parameters p ON p.[object_id] = o.[object_id]
WHERE o.[name] = 'stored_proc_name' AND o.[type] = 'P'
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to get the schedules of each class from this list: http://timeplan.uia.no/swsuiakrh/public/en/default.aspx
Is there an easy way to do it? I have heard of datamining but i have no idea what it is, any good tutorials for it?
Use cURL to fetch the page and then use something like DomDocument to get the exact data that you want.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am unable to delete data from multiple MySQL tables using following query;
$rel=$_POST['releaseno'];
$sql="DELETE from `tbl_uat`,`tbl_fault` WHERE `tbl_uat`.`release`='$rel' AND `tbl_fault`.`release_no`='$rel'";
I think there is a problem with the query, can any one please identify where's the problem.
Kind Regards
You need to tell the DB from which tables you want to delete by doing delete u,f from ...
$rel = mysql_real_escape_string($_POST['releaseno']);
DELETE u, f
from tbl_uat u, tbl_fault f
WHERE u.release = '$rel'
AND f.release_no = '$rel'
You also need to escape your user input before inserting into your query!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Can I use this php code wih WHERE? SELECT SUM(buzz) as buzz FROM $table I want to calculate sumation of some spesific rows.
If you want specifically in PHP then this might help you
SELECT SUM(buzz) as buzz FROM $table WHERE $where
No, you can't use PHP code in an SQL where condition. Databases typically don't include a PHP interpreter.
What you can do is use PHP to generate the where clause that you need.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Can I use INNER JOIN in Cassandra ?
SELECT * FROM device,device_token WHERE device_token.id_phone = device.id
If I cannot use inner join. What type of query I can use in cassandra instead for inner join?
There are no joins in Cassandra.
Most people denormalize i.e. insert the data multiple times into the rows where it is needed. Cassandra is designed for extremely fast writes so increasing the insert workload is normally a good tradeoff.
You can also do a separate query and join manually, but this is normally slower.
You can use collections to model joins. Look as set, list, map and docs about it: http://www.datastax.com/docs/1.2/cql_cli/using/collections