Posts by Marcos Vinicius • 7,188 points
309 posts
-
20
votes1
answer9558
viewsQ: Is there official documentation for Javascript?
Is there any official Javascript documentation like you have PHP.net or jQuery.com? When we search on Google nothing like Javascript appears.com...
-
1
votes1
answer250
viewsQ: How to use Foreign key in SQL statements?
I’m wanting to use Foreign key but I’m not getting it. This instruction SQL will create a table called tbl_estado with 4 columns id, nome, uf, pais and in the column pais will enter the key Foreign…
-
0
votes2
answers750
viewsQ: How to apply colors to an image through a color palette without Flash?
A client asked me if I could make a system like this. Could someone give me an idea of how to do this without Flash? It has a cup with a detail and the two objects will receive different colors…
-
0
votes1
answer450
viewsQ: How could I trigger an action in a PHP script with a link?
How could you trigger an action in a PHP script from a link? <ul class="categorias"> <li><a href="">Lançamentos</a></li> <li><a href="">Vista…
-
0
votes2
answers137
viewsQ: How to return 2 decimals in a monetary value with jQuery?
How can I treat this string to return only 2 decimals after the point? $(".subtotal2").text(23.90); var sum = 0; $(".subtotal2").each(function() { var val = $.trim( $(this).text() ); if (val) { val…
-
4
votes2
answers3135
viewsQ: How to add with jQuery data in a table?
How to obtain with jQuery the sum of all the fields of class="subtotal1" returned from the database? <?php while($M_P = mysql_fetch_array($Dados_Produtos)) { ?> <tr class="somatoria">…
-
1
votes3
answers194
viewsA: Why use float:left and display:inline at the same time?
These two instructions allow html elements <li> are arranged on each other’s side because by default the CSS displays an unordered list (<ul>) or ordered (<ol>) whose elements will…
-
0
votes2
answers737
viewsQ: How to keep query filters sent via $_POST?
$page = ((isset($_GET['pagina']) && intval($_GET['pagina']) > 1)? intval($_GET['pagina']) : 1) - 1; $limite = 12; $atual = $page * $limite; $limit = " LIMIT {$atual}, {$limite}"; //…
-
0
votes1
answer1021
viewsQ: How can I paginate these results?
I made an SQL to filter results according to the desired parameters which resulted in the following statement: $query = $pdo->query("SELECT * FROM imovel ".trim($where, ' AND ')); Whereas I used…
-
0
votes1
answer75
viewsQ: How to match a value before it is available?
I have a site where I do an SQL that returns the records and the amount of records I need to show on the site. For some reason that does not come to question, I no longer have the possibility to…
phpasked Marcos Vinicius 7,188 -
0
votes2
answers234
viewsQ: How to make this SQL request with this particularity?
In this search when the array returns the 4 as the SQL demonstrated below, I need the system to return all the results whose number of dorms and >= 4. You can help me get this result. I converted…
-
0
votes1
answer121
viewsQ: Rewrite the code to display expected result?
This code must return all records from the table immovable if the array is empty and returns selected records if there are items in the array. I can have the array mounted and the database consulted…
-
2
votes1
answer981
viewsQ: SQL query does not work when it has accents
I have in my database a category defined as LAND/AREAS that when making the following SQL query does not return any result of the existing 18. SELECT * FROM immovable WHERE 1=1 AND CATEGORY IN…
-
0
votes2
answers248
viewsQ: To do a complex search I would have to use OR to combine all the instructions?
I would like a help to make SQL as per the data in this figure. What I know is that if I send AND for all characteristics and one of them return false or erro all SQL will be compromised. I thought…
-
2
votes10
answers360
viewsA: Organization of CSS
Actually when I finish developing the CSS, i do a file compression CSS for website or system optimization purposes or whatever it is. For such use this website, Passing an excellent tool for…
-
5
votes1
answer1626
viewsA: Form does not pass data via POST
You opened and closed the form outside the body <html> <body> <form name="sai_frm_incl_patr" method="post" action="sai_incl_peri_seri_patr.php"> <table border="0"…
-
5
votes2
answers183
viewsQ: How to insert a header to each N records?
How can I enter a header for each N records? Type ... <h1>CABECALHO</h1> Cadastro 1 Cadastro 2 Cadastro 3 Cadastro N <h1>CABECALHO</h1> Cadastro .. Cadastro .. Cadastro ..…
-
5
votes3
answers14765
viewsQ: How to check if any field of a specific class or type is empty?
Programming for recording multiple data from the same type or even class within the database, I came across the need to verify that any of these inputs would not be empty at the time of insertion.…
jqueryasked Marcos Vinicius 7,188 -
2
votes3
answers14765
viewsA: How to check if any field of a specific class or type is empty?
I developed this script that meets your need, knowing that you will have 10 types = email, then created this solution that controls whether all types=email are filled. You can still use a function…
jqueryanswered Marcos Vinicius 7,188 -
4
votes8
answers12405
viewsQ: How to switch between true and false checked input?
I have this code and would like to switch between true and false the attribute checked input. Strangely is catching the id of label because the web designer superimposed the label at the input.…
-
1
votes1
answer101
viewsA: Database migration from one server to another
In fact the entire Wordpress migration procedure should be thoroughly pre-meditated so that you do not have problems as large as the size of the system in question. I’ll show you a step of what…
-
1
votes2
answers142
viewsA: Why this SQL syntax error?
I got the syntax error right and the code went like this: $sql = array('0'); foreach($words as $word){ $sql[] = "CATEGORIA LIKE '%{$word}%'"; } $sql = 'SELECT * FROM imovel WHERE ' .implode(' OR ',…
-
0
votes2
answers142
viewsQ: Why this SQL syntax error?
$termos = (explode('/', implode('/', $_GET['tipo']))); print_r($termos); Array ( [0] => CASA [1] => CASA EM CONDOMINIO [2] => COBERTURA ) I have a syntax error in this SQL that makes loops…
-
1
votes1
answer84
viewsQ: How to search for records that fit into any category of a list, even if the category name only partially matches?
I have this instruction: $nova = (explode('/', implode('/', $_GET['tipo']))); Which results in this array: Array ( [0] => CONJUNTO [1] => SALA [2] => LOJA ) When I do this query in my…
-
0
votes1
answer135
viewsQ: How to transform this array?
I have a form that in certain fields returns me several possibilities of data in a single index when I print the array. This situation can be seen in índices 3, 4, 5 e 7. Array ( [0] =>…
-
1
votes1
answer64
viewsQ: How to make these SQL requests?
I’m developing a real estate portal but as it’s the first time I do one, I don’t know exactly how the logic works to achieve the desired result. After plotting a path, I’ll still have to turn it…
sqlasked Marcos Vinicius 7,188 -
6
votes1
answer2821
viewsQ: How to limit the number of pages shown in a pagination?
With this question that already has solution, I got as a result a paginação com PDO but I have one more problem that will possibly be the subject of a reward next week. As you can see in the image…
-
6
votes1
answer3999
viewsA: How to execute a pagination with PDO?
This is a complete script of paginação em PDO. Make yourself at home!!! Is here: http://pastebin.com/CkcwxdDi <?php # inclui o arquivo config(arquivo de conexão com o banco de dados)…
-
0
votes2
answers1484
viewsA: How to return Latitude and longitude on Android Google-Maps
This probably won’t be the answer but it’s just to try to give a light: I get the coordinates by extracting them from a query as follows: URL PERMANENTE:…
-
6
votes2
answers640
viewsQ: How to print the SQL statement that is being sent to the database?
I would like to know how to printout an SQL for the purpose of controlling the statement being sent to the database: $sql = $pdo->query("SELECT * FROM imovel WEHRE CATEGORIA = 'APARTAMENTO'");…
-
4
votes1
answer3999
viewsQ: How to execute a pagination with PDO?
I am developing an application in PHP but I just started in PDO and I have no idea how to make a pagination using the same. I managed to put together a little query with example of the information…
-
0
votes1
answer126
viewsQ: How to modify the text from the database?
So when I request the text in the database through this instruction in php <?=converte($linha['DESCRICAO_PARA_WEB'], 0)?> the text is displayed whole block without line breaks. This function…
-
1
votes2
answers84
viewsQ: How to insert a REQUIRE in this function?
How do I insert a require in this Wordpress function for menu in administration? add_action('admin_menu', function() { # $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url…
-
0
votes1
answer204
viewsQ: How to insert Wordpress icons in the administrative area menu?
How to set icons of Wordpress itself, icon that is located on the line 10 of this function? add_action('admin_menu', 'pagina_gerencia'); function pagina_gerencia() { add_menu_page ( 'Gerência de…
-
6
votes3
answers212
viewsQ: What is the reason for this IF/ELSE assignment?
Because in this code the value 0 is assigned to the IF and the value 1 is assigned to the ELSE? <?php $flipCount = 0; do { $flip = rand(0,1); $flipCount++; if ($flip){ echo "<div…
-
0
votes2
answers905
viewsQ: Google Maps with file_get_contents error. What can it be?
I am implementing Google Maps on a real estate site and I have a problem to solve: the request gives error of file_get_contents($url) ... Right in the middle of the code has the result of the…
-
1
votes2
answers148
viewsQ: How to insert the ID in the database since it is the first field of the table?
I have auto increment ID and am having error counting columns with this code. How can I enter the ID together? #SQL Execute $uir = $pdo->prepare("INSERT INTO visitados VALUES (:IMO_CODIGO,…
-
3
votes4
answers2051
viewsQ: Leave last 12 records and delete the rest in PHP/Mysql
I would like to make sure that after running the script, there can only be the last 12 records in a specific table that has the date field in international format if it can assist. <?php # Este…
-
-5
votes1
answer449
viewsQ: PDO connection file. How to use?
I have a PDO connection file. To include this connection in other system files in order to make the requests in the database, I will use this???? <?php require('conexao.php'); ?>…
-
1
votes1
answer292
viewsQ: How to make a conditional loop in Wordpress depending on the category?
I need to formulate this code to respond to the requirements of a specific category where within it the posts will be presented randomly. For that I made this code on category.php of the template…
-
1
votes3
answers9511
viewsA: Ask before deleting database data
Test this code like this, it does exactly what you want ... if you choose cancel it simply stops the script and does not give refresh on the page, if you give a Ok, he leaves for delete.php with…
-
12
votes4
answers1502
viewsA: How to make a layout ready for all resolutions
You need to use the media queries styled css to format your code according to the resolution used. Example of media queries: @media screen and (min-width: 320px) { html, body {background-color: red}…
css3answered Marcos Vinicius 7,188 -
7
votes1
answer20429
viewsQ: XML file with no associated style information
What is the meaning of this message? This XML file does not appear to have any style information Associated with it. The Document Tree is Shown Below. I have this message in a dynamically generated…
xmlasked Marcos Vinicius 7,188 -
0
votes3
answers78
viewsA: Wordpress content
You can create your custom tables within the Wordpress database without any problem and feed them with forms and whatever you want, and then fetch this information with the same ease through mysql,…
wordpressanswered Marcos Vinicius 7,188 -
1
votes1
answer2437
viewsQ: How to disable date and time spent in jQuery UI calendar?
I would like to know how to create a function that disables the dates passed in jQuery UI. For example, it is now 15/09/2014 07:31:25, how to disable any date and time prior to this current time?…
-
2
votes4
answers14935
viewsA: How to solve image upload problems in Wordpress?
So guys, through a plugin that allows you to access easier settings of the uploads folder, I was able to edit the path of the upload folder that was wrong after a site migration. This plugin is the…
-
1
votes4
answers14935
viewsQ: How to solve image upload problems in Wordpress?
After migrating to Kinghost, I’m having trouble uploading images to the Wordpress library. I normally upload the image but it seems that it does not enter the library, it is as if it had been…
-
0
votes5
answers786
viewsA: Can I make a Javascript call through PHP?
I do not know how far in technical terms, logic and security this is recommended but I do it myself a lot just to give an Alert and sometimes redirect the script even because of headers errors that…
-
-1
votes1
answer390
viewsQ: How to enter this information in the mysql database?
$pegacodigos = mysql_query("SELECT CODIGO FROM imovel"); while($codigo = mysql_fetch_array($pegacodigos){ ... Erasing and writing all over again: The $pegacodigos through a loop picks up all the…
-
2
votes4
answers1688
viewsQ: Fill fields of a multidimensional array with null
I have this code who returns me this array and if you notice, you can see that you have empty fields. What I can increment in this code so that where the index is empty receives the value null?…