Jump to content

shivabharat

Members
  • Posts

    371
  • Joined

  • Last visited

    Never

Everything posted by shivabharat

  1. Same thing goes here . Save the Mysql commands in a file <name>.sql
  2. Its called an alias name say you have a tabled name phpfreak you can create an alias named \"p\" and refer it by that name in the query. select * from phpfream p where p.name=\"php\" Alias names are typically used in joins!
  3. Use a java script to ensure that they type all the information in the form. Have a look at this http://www.phpfreaks.com/forums/topic4536.php
  4. use mysql_rows() function As said by rhysmeister use the rand() function syntax rand (int min, int max) 3) Now, perform a query with \"... LIMIT $rand_row, 1 ...\" $random = ran(1,234); $sql = "select * from table limit 1,$random"rand (int min, int max)
  5. Ensure in the path to execute you have c:mysqlbinmysqld-nt If its not the same path try this in the command prompt c:mysqlbinmysqld-nt --install c:mysqlbinmysqladmin -u root shutdown restart the service agian Hope this helps!
  6. Mysql database is the one which you have look for because you have a table called \"user\" which is used to add and give him privelage. By default \"root\" user password <blank> is given the full rights. SO log in as root and have a look at the user table. If you are using windows OS get yourself Sqlyog tool which can be really handy.
  7. Have a look at this http://www.mysql.com/products/licensing.html
  8. Try this query SELECT * FROM guestbook_main WHERE entry_num between \'$min\' and \'$max\' ORDER BY entry_num DESC
  9. Have you defined a primary key in your table? like PRIMARY KEY (`email_id`) This way you can eliminated all duplicate values. Can you tell me why you want to enter the same data to another table? So try to recreate the table and use the TRIM to strip the whitespaces. Hope this helps!
  10. To add and change password you need to do that in the users table in MYSQL database. If you are using windows OS you can download sqlyoy tool which can be handy. www.sqlyog.com
  11. Yes it is possible . You can create Batch scripts which can be run in any platform. If you have sqlyog tool with you , you can create the batch scripts pretty easily.
  12. If I am not wrong I guess it cant be done in mysql when you try to use now() or date() or curdate() it actully sets like this default \'0000-00-00\' I am not sure if there is any way this can be done.
  13. You can try something like this update <table_name> SET <filed_name> = (replace(<filed_name>,"string1","string2"));
  14. I dont recommentd pconnect because you have to explicitly close the connection when it its not needed. When using the general connect its not really compulsary to do that.
  15. There is nothing wrong with the query INSERT INTO users(columnname1, columnname2) VALUES(\'$field1\', \'$field2\') Even this work INSERT INTO users SE T couluname1=\'$field1\',coulmnname2= \'$field2\'
  16. I really dont see any error :? I am not sure whats causing the error! Try to execute the insert quesry speartely in the mysql prompt and see is you still get the same error?
  17. Can you show us a sample data which you are trying to insert ? and also a bit of ur tabel structure!
  18. Try this $query = "DELETE FROM notices WHERE id = \'$id\' ";
  19. We can help you better if you can explain the purpouse of each table Organization a) Id - Primary key B) name Contact a) Id - Foreign key to Organixation table B) Org_id // Not needed you have the ID in org table which can be used c) Name d) Phone e) Email f) Address g) City h) State i) zip mop (method of payment) a) id - Foreign key to Organixation table B) org_id // Not needed c) card_nbr d) exp_date e) verification_nbr
  20. I am bit confused How do you have so many records with a unique ID ??
  21. Why is that you have many record with the same route ID arent they supposed to be different? Now if you can work on it and make it a unique key (primary) then what you are looking for will become simple.
  22. I agree with the result you get because you have just specified the macthing criteria as routeid=\"1\" isnt so? To get the above result you have to write something like this SELECT routes.routeid, depart.departcode, arrive.arrivecode FROM routes, depart, arrive WHERE routes.routeid = \"1\" AND depart.departcode=\"YPAD\" ;
  23. I guess what is being displayed is not the complete query is that so? SELECT name, County, sector, company_size FROM beacon WHEREcompany_size BETWEEN 1 AND 9 AND County LIKE \'Leicestershire%\' See that u send the correct value and alos I see there is no space \"BETWEEN 1 AND 9AND\" so u have to add a space inbetween
  24. As a suggestion Try this echo $sql which will be the query now execute the query separtely and see if u are getting the desired output. $sql = "SELECT name, County, sector, company_size FROM beacon WHERE". $where ."AND". $where1; echo $sql; $result = mysql_query($sql) or die("Problem");
  25. Try this $result = mysql_query("SELECT name, County, sector, company_size FROM beacon WHERE". $where ."AND". $where1) or die("Problem");
×
×
  • 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.