pranav_kavi
Members-
Posts
126 -
Joined
-
Last visited
Never
Everything posted by pranav_kavi
-
Read this snippet frm http://www.php.net
-
Advice needed on mysql relationships / design
pranav_kavi replied to jcstanley's topic in PHP Coding Help
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.. -
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')
-
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' ?
-
chk tis out... http://www.dbforums.com/t1044828.html
-
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)...
-
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?
-
[SOLVED] Newbie needs help Im going crazy with this error code.
pranav_kavi replied to pnkgirl25's topic in PHP Coding Help
r u using a \n sumwher in ur code or file that comes widin the limit of the php tags? -
so twas it..instead of a normal numeric comparision,the string comparision had failed the condition.
-
wat s the databse type for column 'Category'?
-
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.
-
try readin tis article.. http://www.thescripts.com/forum/thread2524.html
-
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.
-
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...");
-
what is the error ur getting??
-
[SOLVED] Hi, can i do a mysql query as below ?
pranav_kavi replied to jd2007's topic in PHP Coding Help
u can do, $que="select col1 from table where col2= ( select MAX(col2) from table ); mysql_query($que); -
i think u can do tat....
-
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.
-
Pls help me understand oop in php better ? its confusing...pls ?
pranav_kavi replied to jd2007's topic in PHP Coding Help
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/ -
try this, while($data = mysql_fetch_assoc($result2)) { $oid = $data['oid']; echo $oid; }
-
Instead of $name,ve u just tried putting 'Joe Smith' directly (just 2 check..)
-
draw jpgraph with table data for every 5 seconds
pranav_kavi replied to kelvin's topic in PHP Coding Help
Based on, Double quotes are not properly closed here properly, -
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
-
[SOLVED] Simple Displaying mysql data through php
pranav_kavi replied to m00ch0's topic in PHP Coding Help
query to create the table is as follows frm backend, create table `test`.`colours` ( `name` text NULL , `favoriteColor` text NULL , `county` text NULL ) -
[SOLVED] Simple Displaying mysql data through php
pranav_kavi replied to m00ch0's topic in PHP Coding Help
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???