Questions tagged as 'php'

2
answers

How to sum a field of a certain ID with multiple records?

Thestorygoeslikethis:apoliticiancanbevotedonforseveral%of%,sothereasonforthesame%candidate%containmultiplerecordswithinthetable.ThezonasbeingID,hehaving6recordsinthedatabasereferringtothe6differentzoneshereceivedvotes.HowtosetupaID_CANDIDATOthat...
asked by 06.03.2015 / 21:24
1
answer

Searching a term in more than one table field

How can I search a term in more than one field of a table in MySQL? For example, I have a website from a furniture store and the customer can search for the term "chair" and that term is in the description, summary, and detail fields, I would li...
asked by 27.10.2014 / 20:53
3
answers

How to use multiples $ _GET in PHP through a URL

Through a URL, I want to display a set of information in the page's HTML, however, there are values I want to repeat in certain URL's and not in others. Example: link <?php echo "<div class='campo1'>" . $_GET['c'] . "</div&...
asked by 21.11.2014 / 14:56
2
answers

Print PHP array data

I am trying to print the data I have in the array. It works, I can see the data. My problem is that I want to print these various data within the same div. As I have so prints only one value. And I do not put the div in the foreach or make anoth...
asked by 04.11.2014 / 11:19
2
answers

Warning: preg_match (): No ending delimiter '^'

You're giving this error:    warning: preg_match (): No ending delimiter '^' found in /home/j17oloba/public_html/libs/lib.php on line 536 function lib_checkemail($email) { if(preg_match("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*...
asked by 19.01.2015 / 17:28
2
answers

Order for quantities of days missing to win

I have this script in my code: $sql = "SELECT * FROM os WHERE status2 <> 'Fechado' ORDER BY XXXXXXX "; $resultado = mysql_query($sql) or die ("Erro na consulta"); while ($linha = mysql_fetch_assoc($resultado)) { $vencimento = $linha["...
asked by 19.01.2015 / 23:53
3
answers

Traversing array of objects and accessing a value

Good afternoon, I have a difficulty, where I need to access an element of an array of OBJECTS, I'm not able to access with the foreach, or for. I need your help! The array of objects: Array ( [0] => stdClass Object (...
asked by 11.10.2016 / 15:56
2
answers

How to use INNER JOIN?

I have a table called event and another category call I need to count amount of categories coming from event->category_id , but I need db to understand and read the category. TABELAS **event** |**Category_id** || TABELA ||**Catego...
asked by 02.11.2016 / 21:09
2
answers

Good practices Codeigniter

I see several programmers call all views to build a page in the example controller: $this->load->view('head',$var); $this->load->view('home'); $this->load->view('script'); $this->load->view('fim_html'); <html>...
asked by 27.10.2016 / 11:53
2
answers

installment value Invalid Pagseguro

Oops, I'm using the transparent checkout of Pagseguro, but if I report a number of parcels larger than 1, on a credit card sale, I get the error: installment value invalid value: My shipping xml: <?xml version="1.0" encoding="ISO-...
asked by 02.11.2016 / 20:22