Questions tagged as 'mysql'

1
answer

Table / Field for price of products in Magento

In which table / field are the prices of products registered in Magento 1.9 stored? I have seen in some sites the catalog_product_entity_decimal table, but I have not seen the price or any other field that looks like a value in...
asked by 19.11.2015 / 05:39
1
answer

Changing value of a field in a select

Query: select id_cliente,nm_cliente,tp_sexo from tb_clientes; In my bank, sex is registered as int would like when I make a select displayed Male or Female instead of 1 or 2 , how do I do it?     
asked by 22.11.2015 / 01:40
2
answers

How to reference foreign keys in registration forms?

I am making a website from a library as a college work, which has the following table in the database: MyproblemisthatIdonotknowhowtohandlethephpcodeandtheformoffieldsthatreceiveforeignkeys.Forexample,intheloanfileIneedtoreferencethebookthati...
asked by 17.11.2015 / 01:41
1
answer

Assemble news by grouping results by user class

I'm developing a news system where a certain class of user will be able to post one or more news for everyone to see it works perfect, but for a better view I would like these messages to be grouped by the class of the user that posted it. I wil...
asked by 21.12.2015 / 22:25
1
answer

Is it possible to change a word from one string to another in the database through php?

I've been working on a method that will fetch all dates that contain "2014" and replace that value with "2016" without changing the rest of the date. I have already been able to return all the columns that contain "2014" but I do not know how to...
asked by 12.05.2015 / 12:14
1
answer

Error in a SQL query in PHP [duplicate]

I am having difficulties with a SQL query in PHP, when I make a query I get the following error:    Warning: mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given in C: \ xampp \ htdocs \ trabalhowebGustavo \ user \ B...
asked by 24.05.2015 / 20:17
1
answer

I need to change only half of the records in a MySQL table

I made this procedure in MySQL to change a record only half of the table but it produces an inexplicable error: It seems that trouble is in%% with% refusing to accept a variable. In SQLServer I used LIMIT to solve the problem, but...
asked by 07.01.2015 / 03:59
2
answers

How to create two connections with different databases?

I need to pass data from one database (DB2) to another (MySQL), and I'm thinking about how to do this, as in the database I have the data I do not have access to some tools, / em>, I can only do SELECT , I thought of making two connections...
asked by 24.01.2015 / 16:17
2
answers

Search the data of the last 7 days from the current date (2014-12-11 11:06:09)

After viewing the this question , the following question arose, which is, in case the date field is in the next format 2014-12-11 11:06:09, how can I return only the last 7 days?     
asked by 05.02.2015 / 19:41
1
answer

How to return more than one column from the same table?

With this SQL I can in my database select and group products by variations that would in this case be different attributes for the same product. So, when generating the view of the product, I have a dropdown in the product with all the attrib...
asked by 26.11.2014 / 17:22