J.Daniels
Members-
Posts
143 -
Joined
-
Last visited
Never
Everything posted by J.Daniels
-
View the page source and see what the value of $get2->image is. Is the path to the image correct??
-
$this is a reference to the calling object in OOP. http://us.php.net/manual/en/language.oop5.basic.php
-
[SOLVED] Schedule to show todays event and future events
J.Daniels replied to debecc's topic in PHP Coding Help
I was actually referring to the date field and the value type stored there. If date is a date field and it is the current day, it will evaluate to less than NOW() -
It's possible there is a problem with the query. To check the query: $result = mysql_query($query) or trigger_error('SQL Failed', E_USER_ERROR); Also, you might have an empty result set. Try echoing out the number of rows returned: echo mysql_num_rows($result);
-
You have a semi-colon at the end of line 50 <TEXTAREA name="music", ROWS="5", COLS="45", wrap=virtual>' . $music . '</TEXTAREA>
-
You added a second echo inside the first echo <TEXTAREA name="music", ROWS="1", COLS="30", wrap=virtual>$music</TEXTAREA><br> <TEXTAREA name="music", ROWS="5", COLS="45", wrap=virtual>' . $music . '</TEXTAREA> <br>
-
There may be a problem with the query, which then returns false. Check to see if there is an error. $result = mysqli_query($conn, "SELECT num, fname, lname, dep, desc, recp, time, date FROM tickets WHERE date = '$currentDate' AND time = '$lastHour'") or die("Error: ".$conn->error);
-
[SOLVED] Schedule to show todays event and future events
J.Daniels replied to debecc's topic in PHP Coding Help
I believe you need to check the value of date. NOW() returns the current date and time. If the value of date only holds the date, I'm not sure if the compare will fail as date might refer to 12:00 am, which would be before NOW(). Maybe you can try to compare date to CURDATE(). -
Are you trying to sort by the name, value, or a combination of both? I don't see a logical sort to your desired output.
-
echo "<INPUT TYPE=SUBMIT VALUE='Submit CR' onClick=\"return confirm('Changing an existing')\">";
-
Take out the for loop and add a counter: <?php $count = 0; while($row = mysql_fetch_array($query)) { echo '<table>'; $class = $count%2 == 0? 'odd':'even'; echo "<tr class='" . $class . "' ><td>"; echo $row['datetime']; echo "</td><td>"; echo $row['month']; echo "</td><td>"; echo $row['year']; echo "</td><td>"; echo $row['client']; echo "</td><td>"; echo $row['surveys']; echo "</td><td>"; echo $row['airtests']; echo "</td><td>"; echo $row['project']; echo "</td><td>"; echo $row['bulks']; echo "</td></tr>"; echo "</table>"; $count++; }
-
Since you are not creating a MySQLi object, you will need to use mysql_query() instead of mysqli_query().
-
SELECT SUM(number) as sum FROM table WHERE id=1
-
Is register_globals on?? Try changing $id to $_GET['id']
-
$sql = "DELETE FROM flash WHERE id=$id"; Where are you setting $id? You can echo out $id to check it's value to make sure it is what you are expecting.
-
You need to return the category field: SELECT COUNT(*) cnt, category FROM videos GROUP BY category;
-
You can try to LEFT JOIN your response table and find any question ids that are null. SELECT q.id, q.question FROM questions q LEFT JOIN response r on q.id=r.question_id WHERE r.user=22 AND r.question_id is NULL ORDER BY q.priority
-
[SOLVED] Getting a few duplicates in an INNER JOIN query
J.Daniels replied to blakekr's topic in MySQL Help
Add DISTINCT SELECT DISTINCT sh_products.id ... -
foreach($HTTP_GET_VARS as $key => $val) { Assuming that $path is a variable passed in the url, $HTTP_GET_VARS is depreciated as a superglobal. Try changing that to $_GET.
-
You want to append to the innerHTML element.innerHTML = element.innerHTML + <code to add 2 more input fields>;
-
You will have to create a PHP function that returns the same value as getDays()
-
PHP is a server side language and Javascript is client side. The PHP script will not get the return value of getDays().
-
You can enter data into the database in any order. For example: INSERT INTO table (table1, table2) VALUES ('table1value', 'table2value'); is the same as: INSERT INTO table (table2, table1) VALUES ('table2value', 'table1value'); What I would be focusing on is what is causing the script to timeout or fail. ie. which out of the 10 records is failing and why