Posts by caiocafardo • 1,897 points
132 posts
- 
		-3 votes2 answers1306 viewsQ: Study Angular 1 or 2I am very old, the first language I learned was in Action Script 1 (this in the early 2000s). Today I need to recycle myself and I want to start to leave Jquery and go to Angular, mainly to develop… 
- 
		1 votes1 answer79 viewsA: How to make a select`Multiple` start with the first option already marked PHP MysqlJust make sure it’s the first pass through WHILE: $checaPrimeiro = 1; $checaSeleciona = ""; while ($row = mysql_fetch_array($query_menu)){ $v_funcao = $row["FUNCAO"]; $v_desc = $row["DESCRICAO"];… 
- 
		1 votes0 answers81 viewsQ: Upload with AJAX, does not go with files older than 2 megasI have an image UPLOAD code with AJAX: $.ajax({url:"php/upload.php", type:"POST", data:new FormData(this), contentType:false,cache:true,processData:false,success: function(resposta){ It only works… 
- 
		3 votes1 answer3954 viewsQ: INNER JOIN WITH ORDER BYIn MYSQL I have two tables, product and product_photo. In the product table_photo has a field that calls first that normally its value is 0. In the administrative system of the site there can be the… 
- 
		8 votes1 answer528 viewsQ: ORDER BY only day without hourIn Mysql I have a column timestamp calling for dia_cadastro (2016-06-21 11:27:32), in consultation I want to give a ORDER BY only on the day, and disregard the time. That is, if they have products… 
- 
		0 votes0 answers54 viewsQ: Detect browser scroll not alwaysI have an animated header, when "scrolo" the site it changes some things with Animate, IE, when the $(this).scrollTop() > 0 (from 1 to 1 million, but only when it leaves position 0) it animates… 
- 
		2 votes1 answer448 viewsQ: Use onclick and ontouchstartI have this div: <div onclick="funcao('')"> And in Iphone (mainly the 6) the onclick does not run very well. I saw that the ideal is to use the ontouchstart, but when I put both of the error,… 
- 
		0 votes1 answer82 viewsQ: Add inline CSS to image using Tiny MCEI’m using Tiny MCE for the customer to post on a website I’m developing. It works super well, the problem is that when you post an image on Tiny MCE, and change its size, it generates the following… 
- 
		2 votes1 answer83 viewsA: PHP only catch the last <p> </p> (paragraph)Good I got here! $recebe_texto = "<p>Nam convallis, odio eget ullamcorper eleifend, tortor sapien.</p><p>Aenean quis nibh turpis. Vestibulum posuere ex.</p><p>In… phpanswered caiocafardo 1,897
- 
		0 votes1 answer83 viewsQ: PHP only catch the last <p> </p> (paragraph)I have a text like this coming from MYSQL (can be text with several paragraphs): <p>Nam convallis, odio eget ullamcorper eleifend, tortor sapien.</p> <p>Aenean quis nibh turpis.… phpasked caiocafardo 1,897
- 
		1 votes2 answers145 viewsQ: Fetch array position from a given term without using the 'inArray' functionIn a certain method, from my input, when typing "me" it checks if the fruit exists in this array: ['banana', 'melao', 'uva', 'melancia'] In case, brings me (position 1 - melao and position 3 -… 
- 
		2 votes3 answers3385 viewsQ: 2 COUNT within a SELECT with LEFT JOINI have two tables: users: id | nome | email shipments: id | id_envia | id_recebe Every time a user sends a card (which goes by email) to another user, mark this table, and every time they receive… 
- 
		2 votes3 answers4076 viewsA: SELECT with PDO and variableWell, I ended up getting it that way: $buscarNoticiaTitulo = "noticias.titulo LIKE '%teste%'"; $sqlNoticias = $pdo->prepare('SELECT * FROM noticias WHERE '.$buscarNoticiaTitulo.'');… 
- 
		1 votes3 answers4076 viewsQ: SELECT with PDO and variableHow is it possible to make a SELECT in MYSQL with PDO next to this below: $buscarNoticiaTitulo = "noticias.titulo LIKE '%teste%'"; $sqlNoticias = $pdo->prepare('SELECT * FROM noticias WHERE… 
- 
		1 votes1 answer80 viewsA: Select from three tables in a list - MYSQLI got! SELECT *, associados.caminho AS caminho_associado, area.caminho AS caminho_area, area.id AS id_area FROM area LEFT JOIN associados_area ON associados_area.idarea = area.id LEFT JOIN… 
- 
		1 votes1 answer80 viewsQ: Select from three tables in a list - MYSQLI have three tables: ESCRITORIOS id nome ESCRITORIOS_SEGMENTO id_escritorio id_segmento SEGMENTOS id nome_segmento What I need is to give a SELECT to list this information like this BLAH SEGMENT:… 
- 
		1 votes0 answers215 viewsQ: SELECT in MYSQL grouped by month, but showing allI have the following table in MYSQL: cavalo - 2016-01-15 cachorro - 2016-01-16 gato - 2016-02-23 coelho - 2016-02-24 ovelha - 2016-03-21 tatu - 2016-03-22 I wanted to give a SELECT and show that… 
- 
		5 votes2 answers324 viewsQ: Search with Mysql PDO in ArrayI have that code: $whereBusca = "itaim-bibi"; $whereBusca = explode(',', $whereBusca); $sql = $pdo->prepare('SELECT id, nome, caminho FROM regiao WHERE caminho IN (:whereBusca)');… 
- 
		12 votes4 answers4310 viewsQ: Enter key do not give SubmitHow to make the enter key fail Submit on a form? Example: in an input by pressing the enter nothing happens. Today I press the enter, the browser gives a Submit, as and had clicked on send button.… 
- 
		0 votes0 answers129 viewsQ: Datepicker with multiple dates dragging the mouseSomeone knows a plugin that works together with Datepicker (jqueryui), where I can select several dates, drag the mouse with the button clicked on the calendar and select as many dates as you want,… 
- 
		2 votes1 answer87 viewsA: How to use friendly urls on a php system?Question 1: I have to make a script that already sends the user URL to the bank? No need, but if not you will have a greater effort to search in your database, I indicate already register the post… 
- 
		4 votes3 answers1647 viewsQ: Take the first and last date of an arrayIn PHP I have this array: $locados = array('2016-01-01', '2016-01-02', '2016-01-03', '2016-01-06', '2016-01-07', '2016-01-08'); These dates within the array represent two different rentals of an… 
- 
		1 votes1 answer683 viewsA: How to show the time of this counter in the window title bar?Just put a set interval every 1 second picking up the value that is in the input timer. setInterval(function(){ document.title = $('.timer').val(); }, 1000); 
- 
		0 votes1 answer271 viewsQ: Force via HTACESS a single URL to run without httpsI have an Ecommerce site, it’s all running with HTTPS, so I put this code in HTACESS: RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] It works well, the problem… htaccessasked caiocafardo 1,897
- 
		1 votes3 answers565 viewsQ: Repeat LEFT JOIN with other parameters in the same queryI have 2 tables: FATHER: id nome SON: id idpai sexo_filho I wanted to make a SELECT that adds up the amount of children male and female, that’s the problem, I can only do with one of the sex: SELECT… 
- 
		1 votes2 answers1405 viewsA: SUM in SELECT with LEFT JOIN being multipliedI did some research and saw that many were using distinct count(distinct produtos.idqual) as somaprodutos I did some tests and solved my problem! SELECT conta.id, conta.nome, count(distinct… 
- 
		4 votes2 answers1405 viewsQ: SUM in SELECT with LEFT JOIN being multipliedI have 3 tables in MYSQL. Bill: id nome 1 caio 2 zé 3 marcelo Followers (the account id, that is, the user has 2 followers): idqual 1 1 2 2 2 3 Products (the account id, that is, the user caio has 3… 
- 
		1 votes2 answers223 viewsQ: SELECT sort by the quantity of another SELECTI have two tables in MYSQL: account: id apelido_usuario 1 caio 2 manoel 3 josé product idconta status 1 3 1 3 1 1 2 3 3 2 I made a SELECT like this: SELECT * FROM conta WHERE apelido_usuario… 
- 
		3 votes0 answers256 viewsQ: Select more than one date with Multidatespicker + shift keyI made an administrative system for a real estate rental site, to mark the dates that the property is already leased I used the Multi Dates Picker, worked really well. Now the client needs an extra… 
- 
		-2 votes2 answers81 viewsQ: What’s the risk with this intel?Speak people, what risk would I take if someone wanted to give an insight into this example: $valorGet = $_GET["valor"]; $sql = "SELECT * FROM tabela WHERE caminho = '$valorGet'"; My question is,… 
- 
		0 votes1 answer339 viewsQ: How not to select records that are within a date?I have a table in Mysql with apartment, so: id | nome | data_ja_locado 1 | ap teste | 09/08/2015, 10/08/2015, 11/08/2015 So when the user does a search he wants to find apartments that are available… 
- 
		1 votes1 answer184 viewsQ: Alignment with FlexboxI’m having trouble doing a project with using Flexbox. Behold HERE my ongoing project These red boxes are distributed using Flexbox, the amount of boxes will vary from 1 to 400, IE, You need to…