sql

How to make an email notifier like google calendar?

Hi I am using asp.net mvc 2.0 C# .NET 4.0 ms sql server 2005 iis 7.0 I want to make an email notifier system just like many sites have such as google. I want user to be able to set a reminder date and when that date is hit a email is sent to them. I am not sure how to do this. I heard of a couple ways but have not found any tutor...

Which .NET APIs should I use to implement a turn-based game server that will respond to an iPad client app?

I've done a search on SO for this topic and have found similar questions, though none seem to address my specific concerns. I'd like to experiment with building a turn-based, eight-person multiplayer iPad game. For this, I'll need to build a game server that manages all the different games being played at any given time. The backend f...

Install a certificate (SSL Encryption) on SQL Server 2005 Express

I found some manual here : http://support.microsoft.com/kb/316898/ru but can't make a step with : The Certificate Request Wizard dialog box opens. Click Next. Select Certificate type is "computer". On "Registration politics" step there is Active Directory registration politic by default and so it requests some registration serv...

Difference between JOIN and OUTER JOIN in MySQL

What is result difference between: RIGHT JOIN and RIGHT OUTER JOIN LEFT JOIN and LEFT OUTER JOIN ? Can you please explain through the examples ? ...

How can I search for multiple terms in multiple table columns?

I have a table that lists people and all their contact info. I want for users to be able to perform an intelligent search on the table by simply typing in some stuff and getting back results where each term they entered matches at least one of the columns in the table. To start I have made a query like SELECT * FROM contacts WHERE ...

How to improve performance by processing database results in parallel?

Hi all, I have a .net application which runs in the region of 20 to 30 SQL queries and processes the results 1 at a time. I have been trying to increase performance by doing some work in parallel. 2 of the queries take 75% of the time, purely because of the amount of data they return. My initial experiments have been to try to split th...

Is there a performance gain achieved by using "SELECT Field1, Field2, Field3 ..." instead of "SELECT * ..."

Is there a performance gain achieved by using: SELECT Field1, Field2, Field3 ... instead of: SELECT * ... ...

sql query - insert

I have the below sql script. When there is no record found by the select query there are no records inserted by the insert statement. If no records found by select query i want to have a record inserted with the new sequence numbers and other fields with null values. how can i do it. insert into testing.test_ref_details(SEQNUM, TEST_T...

ACL / Permissions system MYSQL database design approach

Hi, this is a bit of a big question, so if anyone can point me to a great tutorial or something else if its too long to answer here that would be great. I have a MySQL database, and I want to have an ACL system to manage permissions to an object. E.g Customer (read | edit | update | delete) So I was thinking I need the following ta...

SQL select without showing joining columns in Joins

How do i exclude duplicate columns of joining keys when we do a join? ...

C# .NET - Dataset type problem

Hi, I've got a few datatables in an Microsoft SQL database. I get those with an dataadapter and put them into a dataset. After this I want to change a few of the values, like some I want to change to: "Na/Na". Now the problem in this is, that the normal Type of this column is INT. So it gives me an error. Is there a way in which I can...

Doing an SQL query in PHP that depends on a variable.

I´m trying to do the following query in PHP $sqlstr = mysql_query("SELECT * FROM sales where passport = $row['passport']"); if (mysql_numrows($sqlstr) != 0) { while ($row = mysql_fetch_array($sqlstr)) { echo $row['firstname']; }} How can I incorporate the value of $row['pass...

assign delete for each row using sql query dynamically not specifying the row NAME or ID

Hi Guys I want to assign delete for each row using sql query but not specifying the row NAME or ID, e.g.: $sql = "DELETE FROM $table WHERE Description1 = 'Description 10'"; ...must be dynamically maybe via row ID to delete correct row at any given time? Please let me know if you want me to eloborate more about the question above, than...

Adding headings to table columns, and outputting a total from SQL

I have this code, $sqlstr = mysql_query( "SELECT * FROM sales where passport = '{$therecord['passport']}'"); if (mysql_numrows($sqlstr) != 0) { echo "<b>Sales for {$therecord['firstname']} {$therecord['lastname']}</b>"; while ($row = mysql_fetch_array($sqlstr)) { echo "<table><tr>"; echo "<td>{$row['product']...

Excluding certain fields from an SQL SUM query

I am using the following SUM query with SQL SELECT SUM(cost) as total FROM sales where passport = How would I exclude certain records from the calculation, for example where paid = 1? ...

Doing an SQL query in PHP where a field from a different table is referenced.

OK, In this query I am displaying the sales for a particular person, matching the passport number from the current form I am working on. What I want to do however, is to sum the total sales and display it, excluding records which have been marked as paid. I am having trouble because "paid" does not existent in the current form I am wo...

mysql_fetch_array for boolean fields?

I have a boolean field, which seems to be stored as 1 when true. When trying to grab that field in a while loop, I get the error: mysql_fetch_array() expects parameter 1 to be resource, boolean given Should a boolean be stored as "TRUE" instead of "1"? Otherwise, why would I be getting this error? edit: My code: $sqltotal = mysql_...

Summing a field while excluding certain fields in SQL

I am trying to suma column in a table, while excluding certain records that have the paid field set to true. I am doing so like this: SELECT SUM( cost ) AS total FROM sales WHERE passport = 'xxxxx' AND paid <>1 The table is full of data, and I can display costs by themselves, or the entire total. Just adding on AND paid <>1 Is w...

Creating non-existent database tables in code

Up to this point my company has had an aversion to databases and has stuck to storing all data in comma-separated files. I have run into a unique customer application that - I believe - would benefit from the use of a relational database. The application calls for storing 'summary' data concerning a manufacturing process and 'detailed'...

Using the ternary operator in PHP

I am trying to print out yes if a boolean table field from a database query is true, and no if it is false. I am doing this: echo "<td>"{$row['paid'] ? 'Yes' : 'No'";}</td>"; Why is this incorrect? ...