Search
 
SCRIPT & CODE EXAMPLE
 

PHP

last_insert_id() php

<?php
// use mysql_insert_id():
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) { die('Impossible de se connecter : ' . mysql_error()); }
mysql_select_db('mydb');
mysql_query("INSERT INTO mytable (product) values ('something')");
printf("last inserted id is %d
", mysql_insert_id());
?>
Comment

PREVIOUS NEXT
Code Example
Php :: PHP strtoupper — Make a string uppercase 
Php :: php unique assoc array by value 
Php :: laravel password require one letter and one number 
Php :: carbon between hours 
Php :: remove last comma from string php foreach 
Php :: array sort php 
Php :: laravel signed Route custom domain 
Php :: login selected user laravel 
Php :: php foreach array pop 
Php :: foreign key in laravel 9 
Php :: for each multiple php 
Php :: php increment and decrement 
Php :: internal server error phpmyadmin 
Php :: run codeigniter 4 with spark 
Php :: carbon compare same date 
Php :: return view inside subfolder laravel 
Php :: import faker in laravel 
Php :: php get slug 
Php :: The uploaded file exceeds the upload_max_filesize directive in php.ini. 
Php :: Session/Session.php error codeigniter 3 
Php :: Set a minimum subtotal amount in Woocommerce cart 
Php :: rest api response 404 wordpress 
Php :: symfony messenger routing 
Php :: php get property with ~ 
Php :: how to deploy laravel windows 
Php :: display error meaages in laravel blade 
Php :: wordpress get uploads images url 
Php :: eloquent insert 
Php :: signup form in php 
Php :: The "AppEntity entity has a repositoryClass set to but this is not a valid class. 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =