There is fan based php game, and one of its file's has over 300 queries. I thought of optimizing it and making it with less queries so it doent crash, and so it runs faster.
So my question is how do i make a php script with less queries.
Example:
if ('this' == 'this')
{
mysql_query("INSERT INTO users VALUES(' ', '$user', 'pass'");
}
if ('1' == '1')
{
mysql_query("INSERT INTO users VALUES(' ', '$user', 'pass'");
}
I thought of trying this:
function do()
{
mysql_query("INSERT INTO users VALUES(' ', '$user', 'pass'");
}
if ('crap' == 'crap')
{
do();
}
if ('1' == '1')
{
do();
}
But then realized it the same, so any ideas ? thanks