Jump to content

pranav_kavi

Members
  • Posts

    126
  • Joined

  • Last visited

    Never

Everything posted by pranav_kavi

  1. i suppose u wud b ving a memberID in ur 'Members' table and committeeID in ur 'Committee' table. Have a join table like 'committee_members' that has 2 columns-memberID & committeeID .so this table wud store the mapping information. hope tis helps..
  2. but that depends on the datatype of the column-playerID. If playerID is of numeric type in db,then query wud b SELECT * FROM players WHERE playerID IN (1, 2) If playerID is of varchar type in db,then query needs 2 b SELECT * FROM players WHERE playerID IN ('1', '2')
  3. do u want ur query to be of the form SELECT * FROM players WHERE playerID IN (-1, -2) ? did u mean hyphens or single quotes arnd i.e '1','2' ?
  4. chk tis out... http://www.dbforums.com/t1044828.html
  5. try, $players = $_POST['matchTeam']; $playerGames = "SELECT * FROM players WHERE playerID IN (". implode(", ",$players). ")"; echo "query: ".$playerGames; $playerGames_query = mysql_query($playerGames) or die(mysql_error()); ......(rest of the code)...
  6. Print out your query and check if the query is valid. In the code u ve givn,r u using a do-while loop or just a while loop?
  7. r u using a \n sumwher in ur code or file that comes widin the limit of the php tags?
  8. so twas it..instead of a normal numeric comparision,the string comparision had failed the condition.
  9. wat s the databse type for column 'Category'?
  10. have ur chkd ur column name-'Category' i.e whethr it s 'category' or 'Category'??? i think u can includ the code for db query.
  11. try readin tis article.. http://www.thescripts.com/forum/thread2524.html
  12. once d user has logged in,set his username in session.in the following pages u can access the session variable to find out the current logged in user.
  13. initally try tis, mysql_connect("localhost","root","suigion") or die("Unable to connect to database..."); mysql_select_db("blogzone") or die("Unable to select database...");
  14. u can do, $que="select col1 from table where col2= ( select MAX(col2) from table ); mysql_query($que);
  15. i suppose u can use str_split() method that can split the string into an array of characters.then echo the array contents till a limit of 150.
  16. These links ll help u, http://www.phpfreaks.com/tutorial_cat/19/Object-Oriented-Programming.php OR http://www.codewalkers.com/c/a/Programming-Basics/Beginning-Object-Oriented-Programming-in-PHP/
  17. try this, while($data = mysql_fetch_assoc($result2)) { $oid = $data['oid']; echo $oid; }
  18. Instead of $name,ve u just tried putting 'Joe Smith' directly (just 2 check..)
  19. Based on, Double quotes are not properly closed here properly,
  20. This may help u, 1)Open a temporary file in write mode. 2)Read each line of the file using fgets. 3)'explode' each line using '|' as delimiter 4)Only if the first token is not equal to 45,write that line to temporary file 5)Once all the lines have been checked,unlink the original file & rename the temporary file to name of the original file
  21. query to create the table is as follows frm backend, create table `test`.`colours` ( `name` text NULL , `favoriteColor` text NULL , `county` text NULL )
  22. i cant figure out y it is not workin 4 u... but ur code s workin for me well..xcept that the value in 'favoritecolor' is not being displayed as the column names do not match. ve u chkd frm the backend...r d records being inserted properly???
×
×
  • 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.