Posts by Wees Smith • 2,778 points
154 posts
-
0
votes2
answers1123
viewsA: Generate 8 digit sequential number
Makes a SELECT to know which code was last inserted: $sql="SELECT codigo FROM sua_tabela ORDER BY codigo DESC LIMIT 1"; $ultimo_resultado='1800000001'; $ultimo_resultado=intval($ultimo_resultado)+1;…
phpanswered Wees Smith 2,778 -
-1
votes1
answer51
viewsA: ajax result in php session
Strip that onBlur="run_pesq(this)" and replaces the function run_pesq() therefore: $('#pesquisa').blur(function(){ var text = $(this).val(); if (text != '') { $.ajax({ type: 'POST', url:…
-
1
votes1
answer57
viewsA: How to access a json with jquery being passed by php
In PHP you close by sending json_encode() of the data? If yes, you do the callback calculation using a function: events: function(callback){ #your code }…
-
1
votes6
answers16160
viewsA: Format 9 and 8 digit phone numbers
function telephone($number){ $number="(".substr($number,0,2).") ".substr($number,2,-4)." - ".substr($number,-4); // primeiro substr pega apenas o DDD e coloca dentro do (), segundo subtr pega os…
phpanswered Wees Smith 2,778