Posts by Marcos Vinicius • 7,188 points
309 posts
-
2
votes2
answers2031
viewsQ: How can I compact directory except specific folder?
Need with SSH to compact a directory except a specific folder within that directory. briefcase: /public_html except for: /public_html/wp-content/uploads/Vista/ How can I perform this operation? I…
sshasked Marcos Vinicius 7,188 -
1
votes0
answers55
viewsQ: Why is my site slow?
Good afternoon, I’m detecting extreme slowdowns on my website right at page startup. As shown in this image, there is a very long wait before the rest of the content starts uploading. I loaded this…
-
2
votes1
answer86
viewsQ: How to mount columns from <ul>?
I have this code and I would like every four results to be entered a <ul></ul> to make columns of 25% wide and get exactly 4 columns. How can I do? <ul> <li> <?php echo…
-
0
votes1
answer266
viewsQ: How to get the category url [Magento] in this code?
This code returns me the categories of Magento but I could not make it increment the category url to be clickable and go to the page of the corresponding category. Can you help me? <ul>…
-
0
votes1
answer99
viewsQ: How to create a jQuery function to pull the menu up?
Would you like to use jQuery to go up and down this menu. Can you help me? The end result should be this ... I started the code but no longer know how to continue. $("#esconder_menu").on("click",…
jqueryasked Marcos Vinicius 7,188 -
1
votes3
answers353
viewsQ: How can I split this INSERT into steps?
I have 70MIL records to insert into one Tabela3 from Tabela1 - 4 fields and table 2 - 1 field. The following code does exactly what I need the most optimized way a user has helped me build. INSERT…
-
0
votes2
answers4604
viewsQ: How to insert by selecting from two different tables?
TABELA 1 - ID - IMOVEL - CODIGO - IMAGEM_G <----- nessa tabela este dado é vazio. - IMAGEM_P TABELA 2 - ID - IMOVEL <----- nessa tabela este dado é vazio. - CODIGO <----- nessa tabela este…
-
0
votes2
answers248
viewsQ: Merge two tables into a third table
I need to merge two tables imagem1 and imagem2 in a third table imagens with SQL. They have exactly the same structure but with 1 query I can’t write all the data at once, so I need to make 2…
-
2
votes2
answers255
viewsQ: Can the webservice set a limit memory usage for who queries it?
I’m having trouble with a webservice because I make a query that returns 69300 records and everything goes well but already with 69595 records it gives error. The question: The webservice can you…
-
1
votes1
answer80
viewsQ: How to work with mirrored systems?
I wonder what the logic would be to work on a web system where I would have a main site and distribute websites for franchisees in their domain. The whole checkout process should be done on the…
-
2
votes1
answer101
viewsQ: How to remove the red part of the figure?
require("setup_do_banco.php"); $colunas = $pdo->prepare("SELECT * FROM origem WHERE ativado = 1"); $colunas->execute(); while ( $coluna = $colunas->fetchAll(PDO::FETCH_ASSOC) ) {…
-
-1
votes4
answers765
viewsQ: How to put a DB column loop inside an array?
I have a database with dynamic columns that can appear one time, another time not... can also be added more columns or even extracted the ones that already exist. I made a code that allows me to…
-
-1
votes1
answer48
viewsQ: Any explanation for this SQL?
$alters = " ALTER TABLE imovel MODIFY COLUMN ENDERECO VARCHAR(150), MODIFY COLUMN BAIRRO VARCHAR(150)"; $pdo->exec($alters); As I decrease the varchar value, it updates, but if I increase the…
-
0
votes1
answer102
viewsQ: How to concatenate SQL statements?
$tarefa1 = "ALTER TABLE imovel DROP COLUMN CAMPONULL"; $tarefa2 = "ALTER TABLE imovel ADD ENDERECO VARCHAR(300)"; $tarefa3 = "ALTER TABLE imovel ADD COMPLEMENTO VARCHAR(3000)";…
-
0
votes1
answer905
viewsQ: How to create columns dynamically with SQL?
I’m running a script that returns 250 values that will be the columns of a database. I need to create the database if it doesn’t exist or simply truncate it and recreate all the tables to update…
-
0
votes2
answers115
viewsQ: How can I return data that is inside arrays?
I am using this code to pull characteristics of a particular product: <?php $array = array( 'key' => '46dfg456465g4d654d65f4564dfg', 'module' => 'imoveis', 'method' => 'listar_origens'…
-
3
votes1
answer39
viewsQ: This script only makes the control when loading the page, How can I do this control during all browsing?
This script controls the existence of the class hide-bar in id header page loading when the class is not yet added to it. I need to find a solution so that once the class is added to the id which is…
jqueryasked Marcos Vinicius 7,188 -
1
votes1
answer11031
viewsQ: How to check without inside a #id has a . class?
Has a top #header that adds the class .hide-bar when scroll but when returning to the top, this class. How to check with jQuery if you are class is present in this id or not? I need this check to…
-
-1
votes1
answer287
viewsQ: How to turn a string into a select with PHP?
After a SQL i have how to return this record: // Dados $cores = "amarelo, branco, azul, verde"; I would like to set up a select where the content of $cores as follows: <select name="">…
-
3
votes1
answer537
viewsQ: 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 be in this case different attributes for the same product. Thus, when generating the product view, I have a…
-
1
votes3
answers98
viewsQ: How to consult and return all product information?
I have the following problem and I will ask a question in a didactic way so that it can be useful to all users who may need it. I want to conduct a consultation SQL that meets all requirements and…
-
-1
votes1
answer466
viewsQ: How to search all the records in the database?
Help me out, guys!!! $BuscaProdutosAtivos = $pdo->prepare("SELECT * FROM tbl_produtos p INNER JOIN tbl_categorias c ON c.cat_id = p.prod_categoria INNER JOIN tbl_variacoes v ON v.cod_prod = p.id…
-
7
votes3
answers1170
viewsQ: How do I count the amount of products per category?
I have the table tbl_produtos id_product product name cat_product I have the table tbl_categorias id_categoria category name How would I count the amount of products for a certain category, for…
-
43
votes4
answers53481
viewsQ: How to decrypt MD5?
If I have the following code $senha = md5("senha") and send it to the database $senha, it should be possible to recover this MD5 at the bank and show "password" back on an information update form,…
-
0
votes1
answer365
viewsQ: How to make a query to return the value of another table?
Table PRODUTOS id nomedoproduct categoriadoproduct valordoproduct Table CATEGORIAS id nomedacategoria In my form I show the name of the category but register in the database in the table PRODUTOS…
-
-1
votes1
answer1575
viewsQ: How to put the data of a while inside a variable?
This code returns me several values of the database: while($TiV = $frm_interesse->fetch()){ echo $TiV['CODIGO']; } ... and I need to send these values by e-mail with the PHPMailer. I need some…
-
1
votes1
answer60
viewsQ: How does the inverse function work in jQuery?
I created this code and I’m trying to do the reverse function, IE, if it’s closed, open, if it’s open close. I’m having problems and I don’t see anything on the console. Can you help me?…
jqueryasked Marcos Vinicius 7,188 -
4
votes4
answers1592
viewsQ: How to ask the PDO if the insertion was made or error?
How to ask the $Produtos if the insertion was made or if there was an error in the insertion attempt or die of mysql? if(isset($_POST['cadastra_produtos'])){ ///////////////////////////////////…
-
2
votes1
answer60
viewsQ: Why is this script returning an object to me?
I am working with jQuery to register information in the database through Ajax and do not know why this code is returning me a variable of the object type. The project I’m working on is being…
-
-1
votes3
answers1789
viewsQ: How to apply background-color to the p HTML element?
I need to apply the CSS property background-color to the HTML element p but what’s happening is that this background-color take the whole width of a div for example if it is the parent element and…
-
0
votes1
answer94
viewsQ: Is there a function in Wordpress to control daughter pages?
I’m looking for a small function in Wordpress that does the following: Se (esta página for filha desta outra) { mostre este menu } Mas (caso esta página seja filha desta outra) { mostre este outro…
wordpressasked Marcos Vinicius 7,188 -
1
votes1
answer67
viewsQ: Is there some kind of dissemination of min and max ZIP of a specific region?
I would like to get the CEP's minimum and maximum of a given region for the purpose of freight calculation for an e-commerce in Opencart. The objective is to restrict the free freight to the capital…
post-officeasked Marcos Vinicius 7,188 -
-1
votes1
answer1018
viewsQ: How to dynamically mark checkbox fields with PHP?
I’m sending neighborhoods by $_GET through a form and would like to mark them dynamically in updating the screen thus making a system of persistence of the search results. <fieldset…
-
7
votes2
answers160
viewsQ: What happens when we run PHP scripts with long tasks?
I’m running a script PHP who is responsible for downloading 55'000 images on one server and downloading these files into a folder on another server. It should take statistics per minute about 1.40…
-
2
votes2
answers1097
viewsQ: How to persist/fill in form data via PHP?
... /busca?tipo%5B%5D=APARTAMENTO%2FAPTO+DUPLEX&area_de=50&area_at=100 In this URL I have 2 types of data: kind of is checkbox APARTMENT APTO+DUPLEX area_de que é select 50 area_at that is…
-
1
votes1
answer47
viewsQ: Why are [ ] characters processed this way in my URL?
When sending a $_GET of my application have the following expression tipo%5B%5D=CASA in my url. The data comes from an HTML element of the type checkbox of name="tipo[]". These characters simply…
-
-3
votes1
answer154
viewsQ: How to recover elements from another table in an SQL query?
I took data from a table wp_posts and now I need to get data from the table wp_postmeta which coincide with the ID captured in the table wp_posts. These data are the product_img1, product_img2,…
-
1
votes1
answer664
viewsQ: How to call PDO in separate system file?
I have a programming problem in which I put my PDO type connection in the header and I need that $pdo be called in any other system file. Example: header.php <?php require("configs/conexao.php");…
-
1
votes1
answer46
viewsQ: Placing explanatory boxes within the Wordpress administration?
I would like to help the system users by placing a box with explanatory text within each part of the administration of Wordpress, for example in posts, pages and even in custom post types. Does…
wordpressasked Marcos Vinicius 7,188 -
2
votes1
answer2160
viewsQ: How to take a parameter in a URL and assign it a new value?
Speaking of my problem, I wanted that when passing a URL with the code below demonstrated, in the middle of the process a parameter was exchanged but specifically the parameter pagina that must go…
-
0
votes2
answers992
viewsA: How to query the DB without refresh and write the returned data?
This code that follows allows the above mentioned query to be made in the database and return the requested data through AJAX. $("#map li a").on("click", function(e) { e.preventDefault(); //…
-
1
votes3
answers1338
viewsQ: How to suspend the $_GET parameter if the array is empty?
This parameter tipo[] is sent to the url even if it is empty. There is a way not to send this parameter if no value has been selected? <input type="checkbox" name="tipo[]" value="APARTAMENTO/APTO…
-
0
votes2
answers992
viewsQ: How to query the DB without refresh and write the returned data?
I need to query my database with something like AJAX/JSON I’m not sure and return the result within a div next to this map. There already exists a div next to receive the result of the consultation.…
-
0
votes0
answers36
viewsQ: How do I make the click not move an element in jQuery?
In this example depending on the place I click, the page moves to reach the ID that is being selected with the click. I would like to prevent the page NAY moved independently of the given click. I…
-
1
votes1
answer43
viewsQ: How to insert into bank with Prepared statements? Problem with ID
I’m having trouble counting columns because I don’t know how to input the data by PDO when you have a id AUTO_INCREMENT that comes before the variable nome. I don’t know exactly how to insert the id…
-
0
votes1
answer211
viewsQ: How to select the result of a CEP json in an existing option?
$.getJSON(url, function(json){ $("#pf_endereco").val(json.logradouro); $("#pf_bairro").val(json.bairro); $("#cidade").val(json.localidade); <---- $("#estado").val(json.uf); <---- How to put…
-
1
votes2
answers271
viewsQ: How do I select exactly the element searched for in jQuery regardless of classes or ids?
If you execute the code you will see that the second form is influenced by the first one and does not take the data for itself. Of course this is a flaw in my jQuery. The first form works perfectly,…
-
2
votes2
answers1343
viewsQ: How to know which form id a function is being sent from?
How do I know which form id is sent from which function? The function is buscar_cidades() and is present in 2 forms Pessoa Física and Pessoa Jurídica. How to know in jQuery which form(id) is being…
jqueryasked Marcos Vinicius 7,188 -
2
votes2
answers79
viewsQ: How to resolve ids problem in jQuery?
I have two almost equal forms, one for individuals and one for legal entities and these forms are hidden and appear as the result of a jQuery().change determining whether the form is for a natural…
-
0
votes1
answer162
viewsQ: What is the meaning of the "indexing equal or removed" error in Mysql?
I am working with small relationships and I realized that in a state table in which I related the field id the table país[id] I get this error message or alert, I’m not sure. Already in a table…