PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
CREATE TABLE `users` (`salt` varchar(255) NOT NULL DEFAULT '$2a$07$12345')
Copy Clear
Copy Format Clear
<?php $salt_query = "select COLUMN_DEFAULT from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA='4740648bc45207496e0e96d7a9dcdd68' and TABLE_NAME='users' and COLUMN_NAME='salt' "; // Run query using mysqli $salt_run = mysqli_query($mysqli, $salt_query); $salt_row = mysqli_fetch_array($salt_run); $salt = $salt_row['0']; $trimmed = trim($salt, "'"); echo $trimmed;
Show:  
Copy Clear