Posts by Jasar Orion • 2,233 points
129 posts
-
3
votes3
answers2052
viewsA: How to avoid repeating html code?
Just save the header and footer in files separated by ex header.php and footer.php after that on your main page instead of header and footer you make a include <?php include("header.php"); ?>…
-
19
votes4
answers6983
viewsA: Delete thousands of records from a table
You should proceed with parallel operations, if I had a good processor can run as follows: ALTER SESSION ENABLE PARALLEL DML; DELETE /*+ parallel(pessoa, 20) */ FROM pessoa WHERE idade > 40;…
-
0
votes0
answers153
viewsQ: The Prestashop api has stopped authenticating
After a server migration, my api stopped passing the user in the variable $_SERVER['PHP_AUTH_USER'] Follow my htaccess and script: # ~~start~~ Do not remove this comment, Prestashop will keep…
-
0
votes2
answers3918
viewsQ: SOAP error after changing php from 5.3 to 5.5
Good afternoon, I did a php upgrade on my server and one of my scripts stopped working. Error shown is this: thrown in /home/brewhead/public_html/catalog/model/shipping/jadlog5.php on line 65…
-
0
votes1
answer214
viewsQ: Post on Facebook Fanpage with PHP
Good afternoon. I would like to take the following action: when someone registers a product on my site, I would like the same product to be registered on my site Fanpage facebook. I have created the…
-
0
votes2
answers103
viewsQ: data conversion problems with php
I have the following function that transforms timestamp into English readable date function dataEmPortugues ($timestamp, $hours = TRUE, $timeZone = "America/Sao_Paulo") {…
-
9
votes2
answers1340
viewsQ: Smart Query with Mysql
I’m trying to make a "smarter" query on my DB, my doubt is as? I have a query: SELECT * from publicacao where titulo like '%$busca%'; and in my DB has several publishing titles, for example:…
-
2
votes2
answers82
viewsA: Validating Jquery Price Format Output Money
one of the solutions is to use a Pattern in the input field follows an ex: <input type="number" pattern="^[R$\-\s]*[\d\.]*?([\,]\d{0,2})?\s*$" /> this validates the following entries 1 =>…
phpanswered Jasar Orion 2,233 -
0
votes0
answers280
viewsQ: Error in MYSQL query
I have the following query select DISTINCT(p.id),g.id, p.slug, p.nome from game g join game_plataforma gp on g.id=gp.id_game join plataformas p on gp.id_plataforma=p.id group by g.id,p.id,p.slug,…
-
0
votes1
answer265
viewsQ: validate 2 recaptchas in memsa page by ajax
Speak blz guys ? I need a help implemented on the same page 3 recaptchas. <form id='form1'><div class="g-recaptcha" id="Login" data-sitekey="minhakey"></div></form> <form…
-
-1
votes5
answers3011
viewsA: How to run a PHP function multiple times?
or if you want to limit the number of executions you can do so $num_max=10; $delay=1; // 1 segundo de pausa entre cada execução for($i=1;$i<=$num_max;$i++){ retornaTemperatura(); sleep($delay); }…
phpanswered Jasar Orion 2,233 -
1
votes1
answer96
viewsQ: Animation with Animate css3
I’m putting together an animation with the Animate css3 .img-minibox{ height:auto; max-height: 200px; overflow: hidden; } ul{ list-style-type: none; margin-left:-40px; } ul li{ float:left; }…
-
3
votes2
answers93
viewsA: Stylize elements at various levels above
if you want to do purely with css gets like this #a:hover + #b { background: #ccc; } <div id="a">Div A</div> <div id="b">Div B</div> This is just an ex but you adapt to your…
-
-2
votes3
answers681
viewsA: Convert Stamp time to full date with php
found a function that solved my problem function dataEmPortugues ($timestamp, $hours = FALSE, $timeZone = "Europe/Lisbon") { $dia_num = date("w", $timestamp);// Dia da semana. if($dia_num == 0){…
-
1
votes3
answers681
viewsQ: Convert Stamp time to full date with php
I have on my bench a field with timestamp datetime and I need to convert the timestamp for this format example: WEDNESDAY, DECEMBER 31, 1969 posted at 3:30 pm I searched here and found a code, but I…
-
1
votes1
answer185
viewsA: Dropdown menu hiding list depending on screen size
your jquery Cod would be something like this if($( window ).height()<=768){ $('nav').hide(); } put that inside an on Ready Ocument and it was already ^^
-
2
votes1
answer58
viewsA: Select in mysql from such Input
just make the following select SELECT * FROM SUATABELA where ind >= '5' If you do not want to display the 5 is like this SELECT * FROM SUATABELA where ind > '5' remembering that SUATABLE is…
-
2
votes4
answers594
viewsA: Return value in SQL Server query
The case usually comes before the where la no select. Your wish should be like this; USE DATABASE SELECT case TIPOUSUARIO when 'A' THEN '2' END FROM TABLE UP (NOLOCK) GO Thus it works that i case is…
-
3
votes2
answers1019
viewsA: Generate random number for an array
uses the function uniqueid PHP, serial something like: $dados2 = connection::select('SELECT * FROM tab1'); $contagem=0; foreach ($dados2 as $reg) { $campo1 = $reg['campo1']; $campo2 =…
-
1
votes1
answer625
viewsA: Error comparing MD5 password in PHP
your error is in your query the correct one should be $query = "select * from admin where username='" . $_POST["name"] . "' and pass='" . MD5($_POST["pass"]) . "'";…
-
1
votes2
answers414
viewsA: Motion Animation in a Box
use the All Animation framework : http://all-animation.github.io/ Just like HTML5, CSS3 also came with several interesting and revolutionary novelties... Among them we have the property Animation.…
-
1
votes1
answer243
viewsQ: Error with Php and Preg_match
I have the following line in a php file if(preg_match("!\oa!", $id)){ until a couple of months ago this worked normally but began to give this error Warning: preg_match() [Function.preg-match]:…
-
1
votes2
answers173
viewsA: Enable Select Field with Javascript
then it’ll look something like this here $( document ).ready(function() { $("#payment").keyup(function(){ if($(this).val()) { $("#campo1").prop('disabled', true); $("#campo2").prop('disabled',…
javascriptanswered Jasar Orion 2,233 -
2
votes2
answers112
viewsA: How to create XML tags from the column name of a mysql database?
to list the name of your columns in mysql vc uses the following command $sql = "desc NomeDaTabela"; $result = @mysql_query($sql); while($row = @mysql_fetch_array($result)){ echo…
-
1
votes1
answer1522
viewsA: Clear fields with Ajax
Do so, the command to clear the form in case would be this $('.ajax-form')[0].reset(); just you put in the part you want to execute this function in the case I believe it is within the scope of the…
-
1
votes1
answer350
viewsA: Make choice via BD table combobox to insert data
your insert code in mysql would be this Cod html <form action="?acao=grava" method="post"> <label for="id1">Nome do Filme</label> <input type="text" name="nome" id="id1"…
-
2
votes4
answers1225
viewsA: How to block website and leave free only for some ips?
your script should be like this first part ( validation function ) function valida($ip){ $retorna=false; $liberado=array('10.11.30.175','10.11.30.182'); for($i=0;$i<count($liberado);$i++){…
-
1
votes2
answers992
viewsA: Passing Parameters from Multiple Checkboxes to a Jquery Variable
You have several ways to work this. To get the check box value you can do the following $("input[type='checkbox']").val(); or if you set a class or id this way $('#check_id').val();…
-
1
votes1
answer46
viewsA: Insertion of multiple GET lines automatically php
Next you’ll post a POG here: Method: POG ( c does not know what q he Pog looks for in google kkk ) will put your url in a db and then search with a normal Selct so that ai vc printa iframe with the…
-
2
votes2
answers565
viewsA: Firebird Select Query using same field twice
follow the consultation that should work SELECT (select count(paciente_id) from agenda where paciente_id='0') as id0, (select count(paciente_id) from agenda where paciente_id<>'0') as idok…
-
1
votes1
answer3494
viewsA: Android Studio installation SDK problem
I had the same problem and solved it as follows: 1) Delete your SDK 2) Create a folder called Android at root C: 3) Download the basic sdk on the Android site ( download version load installer ) 4)…
android-studioanswered Jasar Orion 2,233 -
2
votes1
answer195
viewsQ: Image Upload with PHP Returning an Error: Undefined index error
Good evening everyone, I am using a script that I have and that I always used to upload images only when I choose some images it returns the error undefined index error the only problem is that in…
-
0
votes1
answer154
viewsA: Rewrite module times error 500
I think you’re forgetting the rewrite base try like this follows ex of mine that I use in my Serrv. Note: apache rewrite mod has to be active if it won’t give error 500 even <IfModule…
-
2
votes1
answer1137
viewsA: How to pass a parameter to be used on another page using html
1) first vc will pass your variables to another page by get normally <a href="/web/video-play.php?v=67452"><img src="video1.png"></a> on the other page you will make <script>…
-
-1
votes1
answer148
viewsA: Block Ubmit if the "real time" check indicates that the email is already registered
Here’s an ex of what you need to do: <form id="my_form"> <span onclick="submit()">submit</span> </form> <script> function submit() { if(emailOK){…
-
4
votes5
answers2081
viewsA: Hide the last 4 numbers from a string
Basically this is the code for what you want $new = substr("187.10.61.291", 0, -4) . 'xxxx'; the return of this is 187.10.61xxxx
phpanswered Jasar Orion 2,233 -
1
votes5
answers7505
viewsA: How to make the font size automatically fit the size of a div
tries it here the function is called "Viewport Sized Typography" or in terms chulos scalable text screen display. p {font-size: 16px; font-size: 4vw;} see more information and other functions on…
-
9
votes1
answer1215
viewsA: Calculate difference between dates up to javascript minutes!
has tried to use the momentjs? http://momentjs.com/docs/ its usability is quite simple looks some ex: <script type="text/javascript" src="moment.js"></script> <script…
javascriptanswered Jasar Orion 2,233 -
6
votes2
answers317
viewsA: Catch string between bars
Try this way below: var url="https://i.ytimg.com/vi/heDA6Yu7hsc/img.jpg"; var part = url.split("/"); console.log(part[4]); Every part of array corresponds to a break of the split [0]=https: [1]=…
javascriptanswered Jasar Orion 2,233 -
3
votes1
answer1277
viewsA: Mysql ignore accents
We solve the problem defined as tables utf8_unicode_ci We convert the character input type of the table ALTER TABLE `tabela` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; Then we convert the…
-
0
votes1
answer44
viewsA: Linphone build error in . /prepare.py
Try running this command on the terminal as root or using sudo apt-get install pkg-config -y then use ./perape.py --list-features if you list Features then it can already be compiled without errors.…
-
2
votes0
answers789
viewsQ: Transparent Checkout Secure Pag : invalid installment value
I have in my shop Opencart the module of the transparent checkout pagseguro I noticed that on rare occasions a customer could not make the payment by credit card. Today a customer came to the store…
phpasked Jasar Orion 2,233 -
2
votes1
answer244
viewsA: Select with MD5 password returning empty
your query is wrong, do so $usuarios = "SELECT * FROM usuarios WHERE usu_login = '".$login."' and usu_senha = '".MD5($senha)."'";
-
1
votes2
answers121
viewsA: Password renewal system
Good morning, I see some very wrong points in what you did. The worst is that this way it was programmed if there are 2 equal passwords will give problem. I believe it should work as follows, I will…
-
0
votes1
answer190
viewsA: CRUD U cannot get the ID and edit the Update
your $id = mysqli_insert_id($link); this wrong you need to insert the connection of db in the command $id = mysqli_insert_id($con);
-
11
votes3
answers9773
viewsA: How to log in PHP?
Do it like this, use this function function logMe($msg){ // Abre ou cria o arquivo bloco1.txt // "a" representa que o arquivo é aberto para ser escrito $fp = fopen("log.txt", "a"); // Escreve a…
phpanswered Jasar Orion 2,233 -
3
votes2
answers1297
viewsA: Retrieve data from another mysql table and quantity
your query will be like this: SELECT (SELECT COUNT(*) FROM comments WHERE media_id='214') as comentarios, (SELECT COUNT(*) FROM media_likes WHERE media_id='214') as likes, a.* from media a where…
-
3
votes1
answer214
viewsA: Develop layout with 3 columns
See if this solves your problem css td span{ font-size:30px; background:blue; width:auto; min-width:1px; text-align:right; float:right; white-space:nowrap; } td p{ background:yellow; float:left; }…
-
5
votes1
answer351
viewsQ: SIP connection - Softphone Java Android
My intention is to create a Softphone, for this I am consulting the libraries of google and doing some tests only that I have enclosed in a part. I don’t want to do start functions, or multiple…
-
1
votes1
answer53
viewsA: Google charts returning null in mysql query and loop
I saw the first mistake see if it solves look for the line echo "['".$row['TECNICO']."',".$row['CHAMADO']."],"; notes the closure of ' I think that’s how it would work echo…