I have an array that will be variable, eg $ ref = array ('123', '654', '555').
I wanted to do a SQL query to bring information from these references, something like:
SELECT *
FROM tabela_itens
WHERE ref = (array do PHP)
How can I do th...
When using php along with html, I know it works by omitting the ";" in one line php tags, but is there a problem that this can lead to?
Omit the ";" is it a good practice or not?
<?php algumaFuncao() ?>
or
<?php algumaFuncao()...
This method creates an Excel spreadsheet, with int and string :
public function arrayToXls($input) {
// BoF
$ret = pack('ssssss', 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
// array_values is used to ensure that the array is n...
I'm making a script to identify if the user is on the site or not, but I have no idea how to do this, could anyone help me?
My question is the following, I want to know if the user is on my page, for example if the user goes to another tab as...
The user is filling the cart with various items, and I have created a jQuery function where items are summed up instantly and presented to it. As soon as he finishes choosing the items and clicking the continue button, the items and value are sa...
I would like to know how to write a SQL for control purposes of the statement being sent to the database:
$sql = $pdo->query("SELECT * FROM imovel WEHRE CATEGORIA = 'APARTAMENTO'");
How to print the SQL statement being sent to the bank?...
Good evening,
I have a search that is working fine, I'm only now having a problem when someone writes a word with an accent or two words separated by space, I break the url.
Would you like to know how I can resolve this situation?
Code...
As I enter a "," between the items in While and in the last item I put a "e" plus a "." .
Remembering that my array will load according to the data in the database.
I need it written like this:
Pera , Uv...
Generally, when you make a service JSONP one of the things to be passed by parameter is the name of the callback that will be used in javascript.
Example:
$dados = [1, 2, 3];
$json = json_encode($dados);
$callback = $_GET['callback...
Because the following code works:
$stmt = $pdo->prepare("SELECT * FROM dados");
$stmt->execute();
$codigos = $stmt->fetch();
echo $codigos['codigo'];
So I can not use it?
$stmt = $pdo->prepare("SELECT * FROM dados");...