<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MySQL on Jamshid Hashimi</title><link>https://jamshidhashimi.com/categories/mysql/</link><description>Recent content in MySQL on Jamshid Hashimi</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 30 Jul 2012 06:51:57 +0000</lastBuildDate><atom:link href="https://jamshidhashimi.com/categories/mysql/rss.xml" rel="self" type="application/rss+xml"/><item><title>MySQL query to append character to each entry</title><link>https://jamshidhashimi.com/mysql-query-to-append-character-to-each-entry/</link><pubDate>Mon, 30 Jul 2012 06:51:57 +0000</pubDate><guid>https://jamshidhashimi.com/mysql-query-to-append-character-to-each-entry/</guid><description>Scenario: You want to append a string or character at the beginning of a db field.
solution:
UPDATE Tablename SET Username = Concat(&amp;#39;0&amp;#39;, Username);</description></item><item><title>Add an integer with a field value</title><link>https://jamshidhashimi.com/add-an-integer-with-a-field-value/</link><pubDate>Mon, 30 Jul 2012 06:49:44 +0000</pubDate><guid>https://jamshidhashimi.com/add-an-integer-with-a-field-value/</guid><description>Scenario: You have a field in database where you want to add it all with a number for example: 1000;
you can update all of them like this:
UPDATE mysql_table SET user_id = 1000 + user_id;</description></item><item><title>How to get data which is added between hours in MySQL?</title><link>https://jamshidhashimi.com/how-to-get-data-which-is-added-between-hours-in-mysql/</link><pubDate>Mon, 26 Dec 2011 09:13:40 +0000</pubDate><guid>https://jamshidhashimi.com/how-to-get-data-which-is-added-between-hours-in-mysql/</guid><description>SELECT * FROM TABLE WHERE HOUR(time) BETWEEN 1 AND 2; This query brings all records between 1 and 2 o’clock according to time field of you table. (time = The DB field which you save the time)</description></item><item><title>Check if a record exist in a specific table of database in MySQL</title><link>https://jamshidhashimi.com/check-if-a-record-exist-in-a-specific-table-of-database-in-mysql/</link><pubDate>Sat, 04 Jun 2011 09:48:00 +0000</pubDate><guid>https://jamshidhashimi.com/check-if-a-record-exist-in-a-specific-table-of-database-in-mysql/</guid><description>You can check if a record exist in a specific table of database in MySQL with the code block below:
if(mysql_num_rows(mysql_query(&amp;#34;SELECT * FROM reports WHERE reportID = &amp;#39;$reportNUM&amp;#39;&amp;#34;))){// Code inside if block if reportID is already there}</description></item><item><title>Mysql veritabanında Rastgele veri çekmek</title><link>https://jamshidhashimi.com/mysql-veritabaninda-rastgele-veri-cekmek/</link><pubDate>Wed, 24 Mar 2010 16:13:03 +0000</pubDate><guid>https://jamshidhashimi.com/mysql-veritabaninda-rastgele-veri-cekmek/</guid><description>Bunun için;
çekeceğiniz query’nin sonunda şunlar ekliyorsunuz:(Kalın olarak yazılan kismi)
$sorgu=mysql_query(“SELECT * FROM table ORDER by rand() LIMIT 1“);
Daha fazlası icin bu makaleyi inceleyiniz:
http://www.learningmovabletype.com/a/001037random_quotes/</description></item></channel></rss>