Jump to content

shivabharat

Members
  • Posts

    371
  • Joined

  • Last visited

    Never

Everything posted by shivabharat

  1. Try this. sample CREATE TABLE `sample` ( `Name` varchar(100) default \'TestName\', `Age` decimal(10,0) default \'20\'); Also refer manual for more details and examples. http://www.phpfreaks.com/mysqlmanual.php
  2. Hi, Try checking the previlages that you have given the default user name is \"root\" password is blank. If you still have issues then you can flush the privelages. I would recommend you SQLYOG (www.sqlyog.com) a GUI tool whcih can be handy. It has easy interface to flush privelages and add ne users. Also select \"mysql\" database and check the user table to see the persmission given.
  3. Have you tried the sqlyog tool www.sqlyog.com It helps you in imoprting data easily GUI based This is the command to import csv file LOAD DATA INFILE <Filename with path> INTO TABLE <table_name> FIELDS TERMINATED BY \',\' LINES TERMINATED BY \'n\'
  4. Try this ALTER TABLE <table_name> add column (hp varchar(100))
  5. Try this select distinct * from table_name; You can also refer the manual for more info.
  6. To add a bit You can get yourself sqlyog a good GUI based tool which can help you a lot. Have a look here http://www.phpfreaks.com/sqlyog
  7. Hi baran, Can you let me know what was the issue you faced when you used that code? This will help me in correcting the code so that it can help others.
  8. Why dont you use an array in this case? while ($row = mysql_fetch_array($retid)) { $catname[] = $row["catname"]; $dogname[] = $row["dogname"]; $pigname[] = $row["pigname"]; $horsename[] = $row["horsename"]; } This will strore the values in an array To loop thru you can use this for($i=0;$i<=count($catname);$i++) { echo $catname[$i]; } Hope this helps!
  9. What do you mean by pointing to database that isnt running Mysql? Do you mean that there is another RDBMS package like orcale or MSSQL installed ? Well Myodbc is an interface to connect to a remote database and also to create DSN to use with other applications. You have to make me clear about what you are trying to do so that we can help you better. If you are talking about synchonization then there are tools available for that and aslo you have to ensure that your RDBMS supports that.
  10. when you click on WinMySQLAdmin you can see it running in the task bar. When you close that also your mysql service wills till run unless you sepcify stop service. The main use of WinMySQLAdmin is to start and stop service and aslo see all the configuartions done on your mysql. Mysql is just a service and as I said eralier make mysql run \"AUTOMATIC\".
  11. Have a look at this http://www.mysql.com/doc/en/Default_privileges.html
  12. Do you still have this issue? I guess we can know more by looking into the \"Event Viewer\" in the control panel. Also you can make the service start automatically when the system is started and also there are settings that can make it try more than once if there are any issues in startrting.
  13. Have a look at this Table structure I know this is confusying. Download the tool I told SQLYOG thats really helpful.
  14. mysql -u root I am just entering my user name and no passowrd is supplied To supply password mysql -u <login_name> -p If you are using windows you can downlaod SQLYOG www.sqlyog.com a GUI tool whcih can help you a lot.
  15. I am not sure if you have set password for the deafult user you can try logging in as \"root\" with <blank> password Once you are able to login then try changing the previlage of the user you created. You can download the SQLYOG (www.sqlyog.com) a GUI based tool which can be handy.
  16. Use a Big INT CREATE TABLE `kundekort_prosjekt_relation_kundekort` ( `id` int(11) NOT NULL auto_increment, `prid` int(11) NOT NULL default \'0\', `kid` bigint(15) unsigned zerofill NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=10; Because INT range is -2147483648 to 2147483647. Hope this helps
  17. shivabharat

    HELP!!!!

    Whats is the issue you are facing? Dowload the php intstaller and not the binaries from php.net. Installer is much easier and you can configure php through that. Mysql goes in similar fashion and you really dont have to do any thing if you have the right setup.
  18. Try this http://www.phpfreaks.com/tutorials/51/0.php
  19. Hi, I would recommned you to refer the mysql manual http://www.phpfreaks.com/mysqlmanual.php To load data from a csv file LOAD DATA INFILE \'<file_name>\' INTO TABLE <table_name> FIELDS TERMINATED BY \',\' LINES TERMINATED BY \'n\' I would also recommend you a tool called sqlyoy which is a windows GUI based tool whcih can help you to execute batch script (.sql) and import/export data. www.sqlyog.com
  20. Please dont post more that once...........................help us
  21. Try this desc <table_name>
  22. How can a insert have a where clause??? Try to use a update if you wnat to update!!!!! :roll:
  23. Thats was more of spelling mistake not \"INSET\" its \"INSERT\" Try this mysql_query("INSERT INTO users (comments) VALUES (\'$new_comment\') WHERE username=\'$username\'") or die(mysql_error()); echo "Comment entered. Thanks!<BR>n";
  24. The above description says it all Ensure in your code that you have something like this $db = mysql_connect("localhost", "admin","admin"); mysql_select_db("dbname",$db); Provide your database name in the \"dbname\".
  25. Use a die statement and check if the query is having some issues. Also ensure that you have supplied all the vlaues.
×
×
  • 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.