The following query will get column names from table in MySql > 5
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'database_name' AND TABLE_NAME = 'table_name';
where
- database_name is your database
- table_name is your table
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'database_name' AND TABLE_NAME = 'table_name';
where
If you have not pushed a commit use the following command to delete last commit.
git reset --soft HEAD~1
$.validator.addMethod("checkEmailAvailability",function(value,element){ var result; $.ajax({ type: "POST", async: false, url:"includes/ajax/check-availability.php", data:{email:value}, dataType:"json", success: function(response) { result=response.success; $.validator.messages.checkEmailAvailability=response.msg; } }); return result; });
In the above code the message for the validator method is set by using
$.validator.messages.checkEmailAvailability=response.msg;
where the response.msg is the message we receive from the server.
If you find this useful leave us a comment.
I had a client that pressed enter after typing in a form by mistake and kept saying that my script had an error.
After disabling the form submission on enter key the problem vanished 🙂
$(document).keydown(function(evt) { var keyCode = evt ? (evt.which ? evt.which : evt.keyCode) : event.keyCode; if (keyCode == 13) { return false; } });
A floating element takes space from the horizontal space from the text that flows around it. If browser view port is small the horizontal space left for the text may only fit a word or two per line resulting in a ugly narrow column.
.floating-text-container { border-top: 1px solid transparent;/*fix for Mozilla Firefox*/ } .floating-text-container:before { content: ""; width: 100px;/*min width required for the floating text container */ display: block; overflow: hidden; }
Assuming you have configured Varnish Cache to drop cookies here is what you have to change to make phpMyAdmin work properly on your Nginx server.
sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/www
if (req.url ~ "^/phpmyadmin") { return (pass); }
– add in sub vcl_fetch
if (req.url ~ "^/phpmyadmin") { return (hit_for_pass); }
$cfg['PmaAbsoluteUri']="http://yourdomain.com/phpmyadmin/";
You can see that it’s not that complicated to make phpMyAdmin work with Varnish Cache.