Weird problem for TIMESTAMP feild
Hi All, I am getting very weired problem after shifting our server. here is the details:- I have a table with two columns 1-TimeStamp timestamp(14) 2- SID bigint(20) when inserting _INSERT INTO _/_TABLENAME values (1258975462,125987)_ results in /_INSERT INTO _/_TABLENAME values (00,125987)_ Timestamp entry gets zeros. Any idea? whats happening Regards, *TM* /
stuck with simple query..... Plz have a look
We have two tables Table1: - ID |Name 1 |name1 2 |name2 3 |name3 4 |name4 Table2: --- PL | PC |PA| Description --- 1| 2 | 4| Some description for Project 1 2| 3 | 1| Some description for Project 2 1| 2 | 4| Some description for Project 3 4| 1 | 3| Some description for Project 4 3| 1 | 4| Some description for Project 5 2| 3 | 1| Some description for Project 6 I need the output like.. - PL-Name| PC-Name| PA-Name - name1 | name2 |name4 name2 | name3 |name1 name1 | name2 |name4 name4 | name1 |name3 name3 | name1 |name4 name2 | name3 |name1 Please guide me how can i achieve this kind of result set. Regards, Tariq
Guru's advice needed ........[Security: SQL injection]
*Dear Friends!* Can someone shed some light on how SQL injection attack occurs when *magic_quotes_gpc *isON and how it prevents when its OFF. To my understanding apostrophise are escaped automatically in POST/GET/COOKIE when its ON, so how it tends towards SQL Injection. Someone suggested to keep magic_quotes_qpc OFF through .htaccess file and use following line of codes to prevent attacks at start of the file... ?php /** * Checks for magic_quotes_gpc = On and strips them from incoming * requests if necessary */ if (get_magic_quotes_gpc()) { $_GET= array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); } ? But unfortunately it does not work for nested POST requests. do anyone have better idea? Secondly why we have to stripslashes while DB (mysql for example) is doing it for us on execution and another question arises doesn't it prevent from SQL injection attack when apostrophise are escaped in query. *What is the best practices handling 'quotation marks' in input string and how to prevent SQL injection. *Looking forward for some advice from panel of experts on forum. Thanks and have a nice day!* *Cheers! *Tariq*
Best practices for sharing members database between different portals
Dear All, Please comment on Best Practices for sharing members database between different portals. Suppose we have 3 portals running on different networks. Assignment is to make a single Login/Pass for all portals, means once LogedIn in one of the portal, could able to access the other portals without loging In. Constraints are, every portal have different Database structure and also have different Global / Session variables. Please share your experience and which approach is the best practice. Regards, TM
Re: How much user LOAD can Mysql bear???
Thanks Fortuno, Adam Actually, I was thinking about concurrent users that mysql can handle, provided with reasonable hardware. Looking for comments / suggestions. Regards, Tariq Fortuno, Adam wrote: Tariq, Check the list's history - this is actually a frequent question. The answer everyone is about to give you is generic. MySQL's ability is havily based on the hardware and OS it runs on. Therefore, a multi-processor machine with lots of memory can handle more than a single processor workstation with 256 MB of RAM. The faster the machine the faster MySQL... etc. Be more specific, whats the hardware and software. How much information are you storing in the DB? Any replication? Regards, Adam -Original Message- From: Tariq Murtaza [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 8:40 AM To: [EMAIL PROTECTED] Subject: How much user LOAD can Mysql bear??? Hi All! How much user LOAD can Mysql bear before die. Regards, Tariq -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
How much user LOAD can Mysql bear???
Hi All! How much user LOAD can Mysql bear before die. Regards, Tariq -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Unicode support?
Dear All Hope you are all fine and doing well. I would like to know the status of unicode support for mysql. I will appreciate if someone share his/her experience regarding data manipulation in unicode on mysql. Best Regards, Tariq Murtaza -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Select and Sort?
Hi All, I am wondering how to do that. Suppose we have data like this below ID Category - 1 Software Engg 2 Engg 62 Commerce 87 Ecommerce 45 physics 95 chemistry 6 biochemistry 7 math 5 Others I want to achieve recordset like below (sorting category by Name and including 'Others' at the end), I want to do that by single query ;), any idea??? ID Category 6 biochemistry 62 Commerce 95 chemistry 2 Engg 87 Ecommerce 7 math 45 physics 1 Software Engg 5 Others Looking forward, Tariq - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Select and Sort?
Thanks for help. here is another solution for that... SELECT if (Category = 'others', '999', 0) as priority, ID, Category FROM TableName ORDER BY priority, Category Tariq Fred van Engen wrote: On Tue, Dec 10, 2002 at 03:32:13PM +0500, Tariq Murtaza wrote: I want to achieve recordset like below (sorting category by Name and including 'Others' at the end), I want to do that by single query ;), any idea??? ID Category 6 biochemistry 62 Commerce 95 chemistry 2 Engg 87 Ecommerce 7 math 45 physics 1 Software Engg 5 Others Try something like this: SELECT id, category from mytable order by concat(if(id=5,'B','A'),category); Only problem is that it won't optimize, so use this on small tables only. Regards, Fred. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php