Jump to content

Vikas Jayna

Members
  • Posts

    121
  • Joined

  • Last visited

Everything posted by Vikas Jayna

  1. [code]grant all on econnect.* to iinnovationscom@localhost identified by 'password';[/code]
  2. The variable $email is not being assigned anywhere and hence the expression if (empty($email)) will always return true. Try changing this to if (empty($ADMIN_EMAILS))
  3. Well! I'm assuming the database connections are properly set and the above code should work fine then. I wonder how the online list is maintained - is it through some flash file included in every page or something else?
  4. You need to give the user 'iinnovationscom' the permissions to access the 'econnect' database. Do it through the following query: [code]grant all on econnect.* to iinnovationscom'@'localhost identified by 'password';[/code] This query will have to be run through the root user or a user that has the permissions on the database 'econnect'
  5. Hi Guys! Has anyone come across a method of upgrading the databse from Mysql 4.0 to Mysql 5.0. Since my database has over a billion records it takes ages to dump the data and to populate the same in the newer version. Is there no tool devised that could directly convert the database files from one format to the other. Have been researching this for some while but no success!
  6. seems as if the query returned no records. Try running the query through the database interface and see if it returns some rows.
  7. And what's the parsing error that you get?
  8. The style register_box will have to be used within the table elements like this: [code]class="register_box"[/code]
  9. Can't understand this! Is the error a parsing error or a logical one?
  10. Could you post the expected output and the output obtained from this code
  11. If you know the name of the bot, then you may be able to check the USER_AGENT in your script and terminate the execution if it matches the same.
  12. Well! You need the access to mysql configuration files in order to configure the slave
  13. A left join could be used to do the same: [code]SELECT * FROM sirovine left join recepti_sirovine on sirovine.sifra_sirovine=recepti_sirovine.sifra_sirovine where recepti_sirovine.sifra_sirovine is null ORDER BY sirovine.sifra_sirovine ASC [/code]
  14. you can try mysql replication i.e. setup your laptop as the master and the online database as the slave of this master. You would need to start replication on the online database (by using "start slave" statement) once you are connected to the network and stop replication (by using "stop slave" statement) when you are to disconnect the laptop from the network.
  15. Check out this link http://dev.mysql.com/doc/refman/5.0/en/group-by-modifiers.html
  16. It can happen in a single query using a join:- [code]select Callbacks.* from Callbacks,TicketsSold where Callbacks.cartID = TicketsSold.cartID and MC_EventDate in ('2006-12-09','2006-12-10','2006-12-16','2006-12-17','2006-12-23')[/code]
  17. This happens because headers need to be sent before any other output in the script. Even a whitespace character sent to the browser before call to header() function will give error.
  18. Hi Raconteur, Use the header() function in your php scripts that sends the database record as the output . This will ensure that it does not get cached in the browser and whenever the script is called through ajax it will give different output
  19. The php code looks fine, would require a bit of hit and trial to get this right. I wonder whether the output of the script is getting cached in the browser. The same can be found by executing the php script (which is being called through ajax) from the command line, like this: [b]php -q <scriptname>[/b] Try this a few times and if this gives different results, the point is proven. Caching of php output can be stopped by using the header function like this:- [code]header("Cache-Control: no-cache, no-store, max-age=0, must-revalidate");[/code] Hope this solves the problem!
  20. In php, if a variable is used without defining its type it throws a [b]NOTICE[/b]. Usually, this i disabled in the php configuration file php.ini, by using the line: [code]error_reporting = E_ALL & ~E_NOTICE[/code] which means report all errors except NOTICE. This does not seem to be the case on your machine. In case, you don't have access to the configuration file, it can still be changed at runtime by using the following line of code at the top of your script: [code]ini_set('error_reporting','E_ALL & ~E_NOTICE');[/code] Once the notice is disabled, no output will go to the browser before call to [b]session_start()[/b] function and hence no warning will be sent by session_start() function. However, [b]header()[/b] function will still send the warning as session_start() has already been sent. To avoid this, you'll have to use buffering. See the [b]ob_start()[/b] function manual http://in.php.net/manual/en/function.ob-start.php
  21. One slight modification, its [b]$_POST[Activity][/b] instead of [b]$_POST[$Activity][/b]
  22. You can try the [b]fsockopen()[/b] function. See the link http://in.php.net/manual/en/function.fsockopen.php
  23. use the [b]htmlentities()[/b] function http://in.php.net/manual/en/function.htmlentities.php
  24. Think this should work! A better way though would be like this:- [code]$query = "SELECT Activity_ID, Name, Picture FROM Activities"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); if($result) { $i = 0; $loop = 0; while($row = mysql_fetch_array($result, MYSQL_NUM)) { if($loop == 0) { echo '<tr>'; } echo '<td width="25"><input name="Activity[]" type="checkbox" value="' . $row[0] . '"><br>' . $row[1] . '</td>'; echo '<td><img src="' . $row[2] . '" border="1" valign="middle" align="center"></td>'; $i++; if($loop == 2) { echo '</tr>'; $loop = 0; } else { $loop++; } } if($loop != 0) { if($loop == 1) { echo '<td>&nbsp;</td><td>&nbsp;</td>'; } else if($loop == 2) { echo '<td>&nbsp;</td>'; } echo '</tr>'; } }[/code] And the second code could be like this:- [code]$actarray = $_POST[$Activity];[/code] Basically, [b]$_POST[$Activity][/b] will be an array containing the values of all the checkboxes that have been checked.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.