Hello! I have a simple code to upload a file to server. <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8">...
Hi. I have this code, it works. $arch = fopen('sales.csv', 'w+'); fputs($arch, "Code, Name, Amount".PHP_EOL); $sql = "SELECT code, name, amount...
Mi db conection is this: <?php class connection extends PDO { public function __construct () { try { parent::...
Hi. Of course, I try to validate is wrong table, is that true the code should show "There are problems", but doesnt do that.
I want to validate if the table exists, if that is true, check if there are records or not. I have this code, but the system show this message in...
ok. I got it. One question about query(), is not necesary to use execute()?? $stmt = $db->query( "statements"); $stmt->execute();
But In PHP manual, says: http://php.net/manual/en/pdostatement.rowcount.php (in Example #2 Counting rows returned by a SELECT statement).
Hi. I try this code:$Data = new Conection(); $sql = "SELECT fiel1, field2 FROM mytable WHERE condicion"; if ($stm = $Data->query($sql)) { echo...
I use PDO. Other way to solve my issue is use: $sql = "SELECT max(id) as valorId FROM table"; $sth = $BD->prepare($sql); $sth->execute(); $valor...
Hello everyone. I using Xampp (php/mysql). I want to insert a record by incrementing by one the value of the ID field, this field is not...
Separate names with a comma.