-
Posts
2,527 -
Joined
-
Last visited
Everything posted by DeanWhitehouse
-
some people
-
ok, but i thought the not would mean while something isnt something. e.g. while(mysql_fetch_assoc() != ) instead of while(mysql_fetch_assoc() == )
-
well how can we help without anything (no code , or description of the problem)
-
any code?
-
Ok, so this is what i have , <?php mysql_connect('db3.awardspace.com','crazyemochild_pv','Natasha'); mysql_select_db('crazyemochild_pv'); $sql = "SELECT * FROM 'Categories' WHERE 'FinishDate' > Now() ORDER BY 'Categoryname'"; $rs = mysql_query($sql); $rows = mysql_fetch_assoc($rs); $x = mysql_num_rows($rs); $x = $x + 0.9; $col1 = round($x / 3); $m = 0; while ($m < $col1) { $tempcatname = $rows['Categoryname']; ?> <a href="showcats.asp?companytype=<?php echo $tempcatname; ?>&county=<?php echo $_SESSION['SessionCountyPub'];?>">:: <?php echo $tempcatname;?></a><br> <?php $m = $m+1; } ?> </td><td valign="top"><p class="paraspaced" style="margin-left:50px"> <?php $m=0; while ($m < $col1) { $tempcatname = $rows["Categoryname"]; ?> <a href="showcats.asp?companytype=<?php echo $tempcatname?>&county=<?php echo $_SESSION['SessionCountyPub'];?>">:: <?php echo $tempcatname?></a><br> <?php $m=$m+1; } ?> </td><td valign="top"><p class="paraspaced" style="margin-left:50px"> <?php //Do While not rs.EOF $tempcatname = $rows["Categoryname"]; ?> <a href="showcats.asp?companytype=<?php echo $tempcatname;?>&county=<?php echo $_SESSION['SessionCountyPub'];?>">:: <?php echo $tempcatname;?></a><br> <?php //rs.MoveNext //Loop mysql_close(); ?> </p> </td> </tr> </table> <?php } if(isset($_SESSION['SessionCountyPub']) != "") { ?> <p class="para"> </p> <?php } ?> The lines that are commented are what i am confused about
-
mail function questions for large amouont of emails
DeanWhitehouse replied to tryingtolearn's topic in PHP Coding Help
When i have mass mailed using PHP mailer, it has never been put in the junk folder or anything similar Here is a test version of it ,if you want to test it out http://djw-webdesign.awardspace.com/Mail%20App/ -
This line Do While not rs.EOF I assume it is something like while(rows[''] != ) { } but im not sure, and all the bits that say rs. something I have improvised a bit, but as i havent seen a fully working version of this page, due to the fact they created a test one for me, i can only guesss what it is doing from the code, which is that when you select your location you get shown a number of links and they have the location in the link,
-
why even assign it as an object why not just use mysql_num_rows();?? forgive me if it sounds stupid
-
mail function questions for large amouont of emails
DeanWhitehouse replied to tryingtolearn's topic in PHP Coding Help
I use PHP mailer, i think that is ok for large volumes of emails -
Because i know what some of it is in PHP and know that it is not needed, can i just ask is anyone planning on helping translate it , or just question why i am doing it although i have already explained?? ???
-
don't forget tizag.com
-
[SOLVED] I have run out of ideas of how to debug.
DeanWhitehouse replied to maxudaskin's topic in PHP Coding Help
ok, add error_reporting(E_ALL); to the top of the page -
Erm to be honest im not to sure, i am doing it for a friend , as there whole site is in ASP and they want it PHP , but as far as what i have translated so far, some of it is not needed
-
i am not physic, try showing the error message and the lines where the error is
-
i believe it will be if(file_get_content("url")) { echo "Page exists"; }
-
make sure you have error reporting turned on put this at the top of the page error_reporting(E_ALL);
-
I dont think someone will download it and fix it all, try showing the code and we will point out where you have gone wrong
-
Any one help ? please
-
try running a phpinfo file after to see if it is changed
-
soz, that code wont work <?php if($index == yes) { ?> <div class='maincontentbg'> <table width="600" border="0" cellspacing="2" cellpadding="1"> <tr> <td> <div class="bottomrighsidebar"></div> <div class="toprighsidebartitle">Latest Free Agents</div> <div class="toprighsidebarbg"><table width="90%" align="center" bgcolor="#000000" cellspacing="1"> <?php $latestagents = mysql_query("SELECT freeagents.id, gamename, game FROM freeagents LEFT JOIN ladders ON freeagents.ladder = ladders.id ORDER BY freeagents.id DESC LIMIT 0,6"); while(list($freeagentsuser,$freeagentsgamename,$laddersgame)=mysql_fetch_row($latestagents)) { if($config[cellbgx]==$config[cellbg]) { $config[cellbgx]="$config[cellbg2]"; } else { $config[cellbgx]="$config[cellbg]"; } echo"<tr bgcolor='$config[altcolora]'><td background='$config[cellbgx]'><a href='./freeagents.php?action=viewagent&agent=$freeagentsuser'><span style='color:#FFFFFF;'>$freeagentsgamename $laddersgame</span></a></td></tr>"; } ?> </table> </div> ...? </td> <td>Spolight Profile</td> </tr> </table> </div> <?php } ?>
-
you would have to do something like mysql_query("SELECT * FROM members WHERE dob > '1975-05-18' AND dob < '1975-05-18'") or something
-
Ok, i don't get why some of that is needed <?php <?php mysql_connect(temp); mysql_select_db(temp); $sql = "SELECT * FROM 'Categories' WHERE 'FinishDate' > Now() ORDER BY 'Categoryname'"; $rs = mysql_query($sql); $rows = mysql_fetch_assoc($rs); rs.MoveFirst $x = mysql_num_rows($rs); $x = $x + 0.9; $col1 = round($x / 3); while ($m < $col1) { $tempcatname = $rows['Categoryname']; ?> <a href="showcats.asp?companytype=<?php echo $tempcatname; ?>&county=<?php echo $_SESSION['SessionCountyPub'];?>">:: <?php echo $tempcatname;?></a><br> <?php rs.MoveNext m=m+1 } ?> </td><td valign="top"><p class="paraspaced" style="margin-left:50px"> <?php m=0 Do While m<col1 tempcatname=rs("Categoryname") ?> <a href="showcats.asp?companytype=<?php echo $tempcatname?>&county=<?php echo $_SESSION['SessionCountyPub'];?>">:: <?php echo $tempcatname?></a><br> <?php rs.MoveNext m=m+1 Loop ?> </td><td valign="top"><p class="paraspaced" style="margin-left:50px"> <?php Do While not rs.EOF tempcatname=rs("Categoryname") ?> <a href="showcats.asp?companytype=<?php echo $tempcatname;?>&county=<?php echo $_SESSION['SessionCountyPub'];?>">:: <?php echo $tempcatname;?></a><br> <?php rs.MoveNext Loop rs.close mysql_close(); ?> </p> </td> </tr> </table> <?php if($_SESSION['SessionCountyPub'] == "") { ?> <p class="para"> </p> <?php } ?> I can do some of it , but i cant understand alot of it , or why it is needed
-
try looking in the manual or google. mysql_num_rows
-
Can anyone help translate this to PHP Dim db, rs, sql, x, m, nowtime $nowtime=Now() Set db = Server.CreateObject("ADODB.Connection") 'db.Open "DSN=allaboutweddings" sql = "SELECT * FROM Categories WHERE FinishDate>Now() order by Categoryname" Set rs = db.Execute(sql) rs.MoveFirst Do While not rs.EOF x=x+1 rs.MoveNext Loop x=x+0.9 col1=x/3 col1 = Round(col1,0) m=0 rs.MoveFirst Do While m<col1 tempcatname=rs("Categoryname") so far i have <?php mysql_connect('host','username','password'); mysql_select_db('db name'); $sql = "SELECT * FROM 'Categories' WHERE 'FinishDate' > Now() ORDER BY 'Categoryname'"; $rs = mysql_query($sql); ?>
-
simple and quick way(not neccesarily good) you can turn error reporting off. error_reporting(0); i think