What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-03-27 15:55:01
bindparam php
<?php /* Exécution d'une requête préparée en liant des variables PHP */ $calories = 150; $couleur = 'rouge'; $sth = $dbh->prepare('SELECT nom, couleur, calories FROM fruit WHERE calories < ? AND couleur = ?'); $... Add solution -
Javascript 2022-03-27 07:35:02
compress string javascript
function en(c){var x='charCodeAt',b,e={},f=c.split(""),d=[],a=f[0],g=256;for(b=1;b<f.length;b++)c=f[b],null!=e[a+c]?a+=c:(d.push(1<a.length?e[a]:a[x](0)),e[a+c]=g,g++,a=c);d.push(1<a.length?e[a]:a[x](0));for(b=0;b<d.length;b++)d[b]=S... Add solution -
Other 2022-02-01 06:56:29
wordpress
<?php // 1st Method - Declaring $wpdb as global and using it to execute an SQL query statement that returns a PHP object global $wpdb; $results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1", OBJECT ); Add solution -
Other 2022-02-01 02:51:14
Zoom image using html js php
<div id="gridview"> <div class="heading">Zoom for Product Images in PHP Shopping Cart</div> <?php $query = $db_handle->runQuery("SELECT * FROM tbl_products ORDER BY id ASC"); if (! empt... Add solution -
PHP 2022-01-23 02:10:09
how to create random alphanumeric in php
<?php // online code for creating alphanumeric in php // this will generate 6 charactor, you can create as many just change the 6 from code $pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyz"), 0, 6); echo $pass; //output : 17... Add solution -
PHP 2021-11-22 00:49:17
print sql query result as an array php
<?php $connection = mysqli_connect( 'localhost', 'root', 'dbPass' ); if ( !$connection ) { die( 'Database Connection Failed' . mysqli_error( $connection ) ); } $select_db = mysqli_select_db( $connection, 'sample_login' ); if ( !$select_db ) { d... Add solution -
PHP 2021-11-20 05:23:10
create config value file in php
<?php return (object) array( 'host' => 'localhost', 'username' => 'root', 'pass' => 'password', 'database' => 'db' ); ?> This allows you to use the object syntax when you include the php : $configs->host instead o... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5