-
Posts
840 -
Joined
-
Last visited
-
Days Won
1
Posts posted by gristoi
-
-
add padding or a margin to the list element
-
Just add a style to the ul tag and set the style for the li to
#headlines li{ list-style:none;}
That will give you no bullet points
-
you can only have it in Descending or Ascending - not both
cool thanks
hmm cant even make it ascending order
$squery = "Select * from Events WHERE EventType like '%seminar%' AND Date > NOW() ORDER BY Date ASC DESC LIMIT 3 ";
-
foreach ($interests as $interest) { $query .= "($id, $interest), "; } $query = rtrim($query, ',');
-
try wrapping li tags around the anchors
<ul id="headlines"> <?php foreach ( $results['articles'] as $article ) { ?> <li><a href=".?action=viewArticle&articleId=<?php echo $article->id?>"><?php echo htmlspecialchars( $article->title )?></a></li> <?php } ?> </ul>
-
Select * from Events WHERE EventType like '%seminar%' AND Date > NOW() ORDER BY Date DESC LIMIT 3
-
try:
class test1 { protected $_index; public function __construct($index) { $this->_index = $index; } } class test2 extends test1 { public function output() { echo $this->_index; } }
-
Try doing it in one query with a nested select:
INSERT INTO table2 ( value1, value2, value3) VALUES ( SELECT value1, value2, value3 FROM table1 WHERE something = something)
-
You need to return a string:
return "Web Airlines"
You were missing your speech marks
-
Use the JOIN statement in mysql .:
SELECT x.field1, y.field1 from tablex x JOIN tabley y ON x.fieldname = y.fieldname WHERE X.fieldname2 = something
-
You will never get a result as
$p
Dosent equals what is in the database. The password stored looks like a sha1 hash. So you need to hash the password with same encryption:
$p =$_POST['upass']; $p = sha1($p);
Then search the database.
-
Try posting the form with the action filled out:
< form action ="<?php echo $_SERVER['php_self'] ?>
-
If you look at gizmola's last message he advised you that the result returns an associative array.
What this means is that the data returned from the server is like this:
Array('tmap'=> 1, 'field2'=> something ...........
So when you are trying
$row=1
you are not accessing what you need from the array. Try
if ($row['tmap']==1)
-
You might want to use a switch statement. It has the same effect as elseif, but easier syntax to follow:
switch(tmap) { Case 0: echo 'selected 0'; Break; Case 1: echo 'selected 1'; Break; Default: echo 'no tmap selected'; Break;
Just remember that you should always use break after each switch statement otherwise the code will continue executing .
-
Without seeing how you have written your code I can only guess that you haven't wrapped your code properly .
What you need to do is point your form to a processing page ie:
<form action=process.php method="post">
Which will send the form to a process.php page. On this page u can capture the form :
If($_POST['Submit']{ // process form then redirect back to a page}
please note that this is a very raw example and u shouldn't use $_post['submit'] . But should give the submit button a unique name. ( and well done for researching the issue and giving it a go first
)
-
Have you at least attempted to do this yourself? Do you have any tables and a database connection set up. If not then a good place to start is to read up on some basic mysql and php tutorials and at least have a go yourself first.
If you have attempted to do this yourself then please post the table structures along with the issues are are having
-
If your using mysql > version 5 you can write a mysql trigger to listen to inputs on the other tables and adjust the value accordingly. Have a read of ;
-
If you want it to delete all historical records but keep the last 1000 etc then a good option would be to use a mysql trigger. This could listen for each insert / update , check the number of rows and delete all but the newest 1000. ( only if your using mysql >5.1.
Have a look at:
-
If you're working with numerical data then try changing the datatype to float and remove the '' from the values
-
Ok, this can be a right pain to get to the bottom of. A few simple things that you can easily overlook.
1. Are you following a namespace convention. Ie your index controller in the base module looks like :
Class Base_IndexController extends .......
2. The names match identically, if foldername is base then class name should start with lowercase b.
I know it's really simple stuff, but the easiest problem to solve can sometimes be overlooked. I can't tell you how Many times I have come unstuck because I have accidently added a capital into one of my filenames / class names when I shouldn't off
-
couple of things, I have my modules folder within the application folder, have you added :
resources.modules='' resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
into your application.ini. I had the same issue when i started trying to add modules and this sorted it
-
try:
$sql="SELECT * FROM table_name WHERE date(date)=DATE_SUB(CURDATE(), INTERVAL 1 DAY);
-
Hi, try moving the starting counts out of the loop
<?php $count= $_GET['seatco']; $adult= 0; $child= 0; $concession = 0; for ($i=1; $i<=$count; $i++) { $ticket = $_POST['tick_com'.$i]; echo "tickets: ".$ticket; echo "<br>"; if ($ticket =="adult") { $adult++; } elseif($ticket == "child"){ $child++; } elseif($ticket =="concession"){ $conc++; } else{ echo "no";} } } echo "Adult".$adult; echo "Child".$child; echo "Concession".$conc;
-
As ravenstar said, u can use xampp, once installed a good interface for writing and testing your mysql is mysql workbench
Firefox cache
in Miscellaneous
Posted
What in particular is not refreshing? Is it php, javascript or css thats causing the issue?