Jump to content

leightr

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Everything posted by leightr

  1. I am pretty new to php. I figured it would be cool to call to the query rather than writting it again if I needed it.
  2. Because I run two sites that use phpfox. I run one on a a nice VPS and another on a shared hosting. Both run super slow. After months of researching it.. and with phpfox help.. they concluded it was because they script runs over 1500+ queries. Which I believe their new release cuts that in half.
  3. I disagree, Look at a script called phpfox.com (a myspace ripoff) It runs so many queries that the script becomes super slow.....
  4. Is it a bad ideal to put all your queries in one include file? Same with Varibles? Rick
  5. I have a question. How would I do this samething but without the database having to say NULL? Basically I want it to check if it is blank and than do the if? // Lets see if there is a address to show a map link. $street = $row['street']; { if ($street == "NULL") { echo "<td>". 'No Directions'. "</td>"; } ELSE { echo "<td><a href=directions.php?id=" .$row['id']. ">Map</td>"; } } echo "</tr>"; } echo "</table>";
  6. Woot. I am a moron. I thank all you for your help. It was working but lacking a <td></td> It was hidding elsewhere on the page!! Thanks again, Richard
  7. Oops I forgot the "". I tried that and now the link disappears but it doesnt post No Directions.
  8. I tried that as well. It still echos: echo "<td><a href=directions.php?id=" .$row['id']. ">Map</td>";
  9. Sorry. I forgot to paste the code ... Anyways, when I used isset nothing happened, it just did the same as the first code I pasted. Here is more of the code: $practice = mysql_query("SELECT * FROM schedules WHERE teamid='$username' AND gametype='Practice'"); echo "<h1>Scheduled Practice Games</h1>"; echo "<table border='1'> <tr> <th>Game Type</th> <th>Game Location</th> <th>Game Time</th> <th>Game Date</th> <th>Op. Team</th> <th>View Map</th> </tr>"; while($row = mysql_fetch_array($practice)) { echo "<tr>"; echo "<td>" . $row['gametype'] . "</td>"; echo "<td>" . $row['gamelocation'] . "</td>"; echo "<td>" . $row['gametime'] . "</td>"; echo "<td>" . $row['gamedate'] . "</td>"; echo "<td>" . $row['oppositeteam'] . "</td>"; // Lets see if there is a address to show a map link. $street = $row['street']; { if ($street == null) { echo 'No Directions'; } ELSE { echo "<td><a href=directions.php?id=" .$row['id']. ">Map</td>"; } } echo "</tr>"; } echo "</table>";
  10. Can someone point out what is wrong with this? { if ($street == null) { echo 'No Directions'; } ELSE { echo "<td><a href=directions.php?id=" .$row['id']. ">Map</td>"; } } echo "</tr>"; It should say No Directions if $street is null. However it doesnt. It just echo's echo "<td><a href=directions.php?id=" .$row['id']. ">Map</td>"; instead.
×
×
  • 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.