Questions tagged as 'sql'

1
answer

SQL only in custom WordPress post for tag conversion

Let's say that a site using WordPress has half the posts of the standard type, and the other half uses a Custom Post Type "review" . But this type of post had no registered tags, so it shared those of the standard posts (post_tag). After...
asked by 31.12.2014 / 00:37
1
answer

Error installing SQL 2008 Express (Silent Mode)

The installation parameters are as follows, but when attempting to make an error and the installation is aborted. C:\Setup.exe /QS /ACTION="Install" /FEATURES="SQL" /INSTANCENAME="SQLEXPRESS" /SECURITYMODE=SQL /SAPWD=senha     
asked by 26.12.2014 / 15:46
1
answer

Implement Follow / Unfollow Feature

I'm developing a follower system, I created a page that searches for registered users. You type in an input a name, and it checks to see if you have any records with that name in the database. I put a Follow button next to each name that re...
asked by 27.12.2014 / 21:43
1
answer

Calculation of the average in php [closed]

I need to calculate the final grade point average for students in a class, I tried using the avg function of SQL, but I did not succeed, the code is this: <?php $idTurma = $_GET["idTurma"]; $idDisciplina = $_GET["idDisciplina...
asked by 04.12.2014 / 00:28
2
answers

How to insert into tables with many-to-many relationship?

I have a question about how I'm going to do the insert with relationship n:n My tables are: Recibo Analise Analise_Recibo (recibo_id, analise_id)     
asked by 20.12.2014 / 12:54
1
answer

How to do this SELECT (SQL Server 2008)?

To be honest, I do not even know how to start my question. So I'll first put the information I have. I have the following structure in my database. I need to do a SELECT that returns me the following: How can I achieve this?   ...
asked by 08.01.2015 / 21:09
1
answer

Give preference to greater equality, mysql

I have a table with a column named X in it I enter comma-separated values, for example: 1,2,3,4,5 . I use this query to get a particular row. SELECT * FROM 'x' WHERE CONCAT(',',x,',') LIKE '%,1,2,%' I wanted to adapt...
asked by 03.01.2015 / 18:12
1
answer

Sort result with 4 different columns

I have a table with 4 different columns, 2 of them indicating the beginning (date and time) and another 2 indicating end (also date and time). Is there a way to sort the result so that it prioritizes the most recent event? for example: If the en...
asked by 27.02.2015 / 22:50
1
answer

DISTINCT with UNION and COUNT

I'm running a query in the database to return 6 results from a Agenda table that has multiple available times per day (eg: 08: 10: 00: 000 | 08: 30: 00: 000 ) and for periods (ex: T (representing 'afternoons' or M representi...
asked by 26.11.2014 / 14:16
1
answer

SQL does not keep new recordings

I'm using a Service-based Database (.MDF) to save some data from an application I'm developing. However, after I close the application, the data that was entered in the table disappears. Here is the code I'm using: System.Data.SqlClient.SqlCon...
asked by 23.11.2014 / 21:47