SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Require SQL info : data integrity & querrying proc
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ajoo
Starting Member

12 Posts

Posted - 12/15/2013 :  02:42:52  Show Profile  Reply with Quote
Hi all ! I have been learning MySQL and the gurus have been so patient and helpful. So here are some more queries from a beginner.

First is regarding the SQL query procedure from PHP. Every time a query is created and we have to go thru the following:

////////////////////////////////////////////////////////////////// query 1
query = "Select * from club";
$result = mysqli_query($link, $query);
if ($result)
{
do whatever for a successful query;
}
else
{
display or log an error
}

///////////////////////////////////////////////////////// query 2
query = "Update club
SET visit = '2';
$result = mysqli_query($link, $query);
if($result)
...

So my first question is that if we are accessing the same Table , namely clubs, in the above example, then is it not possible to avoid repetitive steps. Can't both & more statements be processed at one go or must each and every query be checked for successful execution? Is there no way to send a group query and have it processed at one go. It would greatly reduce the coding size and therefore chances of errors.

The second question is that if more than one person is accessing a database at the same time, trying to read or write into the tables, and there is a time clash, how will mysql handle it? Would it automatically queue the entries or would some of the entries be lost ? If the entries are lost, then how can this be prevented ?

Thanks all the gurus for all the help so far and that which would ensue.
Cheers !

waterduck
Aged Yak Warrior

Malaysia
961 Posts

Posted - 12/16/2013 :  01:20:17  Show Profile  Reply with Quote
maybe u can try luck in http://forums.mysql.com/
Go to Top of Page

Ajoo
Starting Member

12 Posts

Posted - 12/16/2013 :  10:55:42  Show Profile  Reply with Quote
Hi guys, Is this such a tough question or is it like fit for the dummy series !? Please I am sure the gurus here can easily answer this.
Thanking all in anticipation of a discussion or a reply.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 12/16/2013 :  11:25:01  Show Profile  Reply with Quote
quote:
Originally posted by Ajoo

Hi guys, Is this such a tough question or is it like fit for the dummy series !? Please I am sure the gurus here can easily answer this.
Thanking all in anticipation of a discussion or a reply.


The thing is you're in the wrong forum
This is MS SQL Server forum and we deal with only Transact SQL. That was the reason you were pointed to a MySQL related forums.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Ajoo
Starting Member

12 Posts

Posted - 12/16/2013 :  21:17:15  Show Profile  Reply with Quote
Oh ok! Thanks.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000