Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
You need to actually extract the data by using functions such as mysql_fetch_array, mysql_fetch_row etc... $querye = "SELECT * FROM `deal` WHERE `category` = 'Outdoor' and `time` = '704'"; $result = mysql_query($querye) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo $row['field_name'] . " "; } ?>
-
Missing a closing ')' in your while clause.
-
I fail to see how that sub query would effect the result. It has no relation with the main query. And if you wanted to select the Tasks that occur at least once then use a HAVING clause in the sub query.
-
Did you restart apache after you made changes to php.ini? You can check to see if postgres exists by running a script with phpinfo() in it. If your extensions reside in the same directory (./) as php.ini then yes. This line just specifies where your extensions exist i.e. php.pgsql.so Figured it out. I did apt-get install php5-pgsql and that fixed the problem. Perhaps this is the 3rd package that was mentioned? Nice. I was just reading a tutorial that goes that route to install the postgres package. It puts the package in your extension_dir, adds the Dynamic Extension entry in your php.ini, and handles some other dependency issues.
-
oh! lol quotes around the variables in my query made all the difference! now my code works and updates the mySQL entry! thankyou so much!! You're welcome, I feel bad you posted such a large thread that probably took 20 minutes Please mark as solved.
-
Did you restart apache after you made changes to php.ini? You can check to see if postgres exists by running a script with phpinfo() in it. If your extensions reside in the same directory (./) as php.ini then yes. This line just specifies where your extensions exist i.e. php.pgsql.so
-
Don't want to be this guy, but everyone has already hinted, scrap the whole thing, sit down re-design and come back with something we can actually critique. Because, like jcombs mentioned, there's not much there to critique besides the color scheme.
-
You also need to put single quotes around '$content' in your query.
-
So I assume you're using Linux since you referenced the .so extension. To answer your question, yes, add that line in your php.ini. You can check to ensure you have "php.pgsql.so" in your extension directory by going to the "extension_dir" (something like that) path. If not you will have to add it, I've never installed postgres before so I'm not sure what's configured by default.
-
Find the section called Dynamic Extensions and uncomment the line that contains "extension=php_pgsql.dll" (Windows) or "extension=php.pgsql.so" (Linux). Restart Apache and run a script that just has these lines. phpinfo(); ?> You should be able to find a list of all the extensions that you have enabled and installed. If you see postgre than you should be able to use postgre.
-
A PK is unique. You're trying to insert a duplicate value in a field that's a PK.
-
The way you have it should work, after you increment your variable of course. It's also conventional to use single quotes for associative arrays rather than double.
-
A couple of issues: - You need session_start(); at the top of your script. - Your loop will result in an infinite loop. - What is the outcome you're getting and what outcome do you want?
-
Do you have the module loaded? You need to include the postgres extension in php.ini and restart apache. You can check with phpinfo().
-
Add this print_r between these two lines: $linkarray = $tspider->parse_array($stag, $etag); print_r($linkarray); foreach ($linkarray as $result) {
-
I know someone mentioned this but put these two lines in both of your files directly after your opening PHP tag: ini_set ("display_errors", "1"); error_reporting(E_ALL); This should have also picked up the single quote error...
-
Look at the quotes. You didn't notice the syntax highlighting discoloration?
-
You have an error on this line: $bored = preg_replace(~~is','',$stringfinal);
-
For future reference it's probably better if you start your own thread and post a link to this one stating it's a similar problem. Your original post resurrected a thread from nearly a year ago. Glad you got everything working though.
-
If you are on linux it comes with a mini dictionary (about 100k words, all separated by newlines). You can probably find more through the package manager. Use Google, I just came across a lot of hits for text word lists.
-
- (FF3) Your "Contact" link gets pushed down underneath the "Home" link and isn't visible until you hover it. - Expand more. You are only using 50% of the page. Too much empty real estate. - The background image isn't very exciting. Your page is supposed to convey the activities, events and excitements of Boston but your background makes me want to fall asleep. - Your fonts are inconsistent. I would avoid using neon colors and maybe choose a more consistent color scheme. - It's not a bad start but needs some work.
-
Do a DISTINCT on the topic.
-
Yes.