• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

mysql_result is defined but mysql_free_result warns it expected a resource

phpmysql


PHP Snippet 1:

$result = mysql_query($query);
if ($result) {
  $id = mysql_insert_id();
}
else echo mysql_error();

Related Snippets

How to get Laravel's CSRF Token from Another Website?

MOODLE: What does it mean to aggregate h5p assets?

Send Outlook 2010 email using PHP

Post Form Data To phpmyadmin Database

Woocommerce redirect after add-to-cart error

Inserting data into SQL Server Db An Invalid direction was specified

PHP: PDO + CSV export not downloading (headers issue?)

Transform array, set each array element with parent key php

Jquery DataTables: Data not displaying in table via Ajax

Best way to scrolldown onpageload

Required field only if another field has a value, must be empty otherwise

php code to send checkbox form results to email

How to convert binary string to normal string in php

MySQL upgrade causing unexpected results on simple WHERE clauses

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

About Contact Privacy policy Terms and conditions