Monday, June 30, 2008

when i work with tables in MySQL-I get error message as "Violation of PRIMARY KEY constraint PK_Patient_Registration . Cannot insert duplicate key in object Patient_Registration . The statement has been terminated."even if i dont have any duplicates in my table.why?

For example

something like this
$result = mysql_query("SELECT * FROM review ORDER BY name");

but instead of ordering it by its name i want to order it by what number of submission it is. So if it was the first thing submitted it would go before the second submitted.

please give me sample mysql queries where each query is embedded with a unique id- can u cites me more examples?

I want to buy an domain name & web hosting service from microsoft officelive. My plan is to create a webste using PHP & MySQL. Does officelive support PHP & MySQL
Actually I wanted to know- does officelive allow to host website that has been created with PHP & MySQL?

I have been using my database to test a program. Now that the program is functional- how do i reset the database but maintain on the tables and parameters. Basically i want to delete all the current data and reset all the id s (on autoincrementt) to 1.
Any reason why I would have to change my mysql calls after this? Now all of a sudden my calls to the database arn t going through and was working a second ago. I run this sql call then use numrows and it is returning 0 when there are in fact rows in the database.

$sql = "SELECT Matches.*- AAMaps.name- ClanInfo.clanname
FROM Matches- AAMaps- ClanInfo
WHERE Matches.clan_id = " . $validentry . "
AND AAMaps.id=Matches.map_id
ORDER BY dateposted DESC LIMIT 3;";

I dopnt understand what mysqls pupose is. Do u connect it to the intenret or somehthing?

No comments: