Jump to content

shivabharat

Members
  • Posts

    371
  • Joined

  • Last visited

    Never

Everything posted by shivabharat

  1. Try this $query = mysql_query("SELECT * FROM \'$table_name\' WHERE show=\'fifth\' AND date=\'$date\'") or die(mysql_error()); $result = mysql_fetch_array($query); echo $result[\'url\'];
  2. Glad to know that it helped you a bit
  3. Humm!! Resource ID is something which the mysql_query. See the manual for more details. <?php mysql_pconnect("*****","*****","*******"); mysql_select_db("Clan"); $Tstrength = mysql_query("SELECT m.clan, SUM(m.strength) FROM members m, clan c WHERE c.id = "1" AND m.clan = "1" Group By m.strength"); while ($row = mysql_fetch_array($Tstrength)) { echo $row[0]; echo $row[1]; } ?>
  4. Whats the version of PHP you have if you have 4.3.2 to you dont have to enable any of the thing to make mysql work as they are built in.
  5. Try this select SEC_TO_TIME(sum(TIME_TO_SEC(time_filed))) from <table_name>;
  6. I guess the problem is in the query formation $query_RSnotes = sprintf("SELECT * FROM notetaker WHERE CustomerID = %s ORDER BY CtelNoteID ASC", $colname_RSnotes); echo $query_RSnotes; see what you get when you display the query? You can also try this $query_RSnotes = "SELECT * FROM notetaker WHERE CustomerID =\'$colname_RSnotes\' ORDER BY CtelNoteID ASC"; echo $query_RSnotes;
  7. I am editing this post as I accept the answer give by another member. :wink: Good call! But you still have to avoid this. Database name is a just a logical identifer for categorizing. Now how did you have two tables that are linked in two sperate database? I guess you need to spend some time reading RDBMS concepts. :wink:
  8. I am not really sure if this is what tou ra elooking for do { echo "PREV: ".$row[\'values\']."NEXT:". $row[\'values\']; } while() Did you mention about having them in a same line? You can also use sprintf if this didnt work!!
  9. Run these commands in the command prompt c:mysqlbinmysqladmin -u root shutdown c:mysqlbinmysqld-nt --remove c:mysqlbinmysqld-nt --install Once this is done go to the service and check if your mysql service is started and if not start it and try to connect .
  10. Ok try this Go to command prompt and try this If you have set a password then you need to use the ysntax like this mysql -u root -p
  11. Goto ControlPanel>Administrative Tool>services Click on the Process named mysql. In the Genreal TAB PATH_TO BE EXECUTED c:mysqlbinmysqld-nt enusre that its pointing to the correct path. If its correct enusre that mysql service is running.
  12. Whats the error message you get?
  13. You can use this query to do the same SELECT distinct aff from `table`
  14. Make the field auto increment Here is an example taken from the manual CREATE TABLE animals ( id MEDIUMINT NOT NULL AUTO_INCREMENT, name CHAR(30) NOT NULL, PRIMARY KEY (id) );
  15. Change the Port line in httpd.conf to 3310 or any other port which not being used and try to access use netstat -AN to see the ports that are bing used Genreally all the mysql password details are stored in the dtabase not in the INI file. Refer the manual to flush the privelages.
  16. I tried with 20,000 records and I dint have any issue. I guess its is not advisable to query a table one the whole and its always advised to break them up. If you try to do and say you have 1,00,000 records I am sure the page would get stuck and you might get CGI timeout error. So I would recommend you to break the data.
  17. DELETE FROM table WHERE table_id=100; Cant believe that this deleted the whold table did you have records with only table_id 100?? How are you executing this ssatement using PHP or in the mysql prompt? You can give this a try. DELETE FROM table WHERE table_id=\'100\'; If you still have problme post with your code and sample table data.
  18. This has been discussed quiet frequently in the forum I am not sure why you dint try using the search option http://www.phpfreaks.com/forums/viewtopic....ess+denied+user http://www.phpfreaks.com/forums/viewtopic....ess+denied+user
  19. Have a look at this posting http://www.phpfreaks.com/forums/viewtopic....&highlight=load
  20. How have you stored the value sin the text files meaning How are the fields seprated and how are the records seprated. If you have it as CSV comma seprated vlaues you can try this LOAD DATA INFILE \'C:\\pet.txt\' INTO TABLE pet FIELDS TERMINATED BY \',\' LINES TERMINATED BY \'n\';
  21. Its lookd like the user doenst have enough privelage try logung as mysql -u root and by default they dont have password unless you have set one. Once you have got in as a super user. mysql> use mysql mysql> select * froom user; You will see the table being displayed check if you have given teh user permission. Now you can also use a tool called SQLYOG found at www.sqlyog.com which is a GUI based tool and can help you a lot. Check it out...
  22. You may try like this Ensure that the whole query is in a single line . <? $contents = file("sql.txt"); while (list($qry) = each($contents)) { echo $contents[$qry]; } ?>
  23. Read this http://www.mysql.com/doc/en/Batch_mode.html
  24. Have a look at this http://mysql.progen.com.tr/doc/en/MySQL_indexes.html http://www.databasejournal.com/features/my...10897_1382791_4 Hope that helps!
×
×
  • 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.