-
Creating a table dynamically
Date: 06/29/05
(PHP Community) Keywords: php, mysql, database, sql
I'm running this bit of PHP script in a page I'm writing for a real estate's site:
$query = "CREATE TABLE 'mls" . $mls . "' ('id' INT NOT NULL AUTO_INCREMENT,'photo' VARCHAR(50) NOT NULL, PRIMARY KEY ('id'))";
$result = mysql_query($query) or die("Query failed : " . mysql_error());
The idea is that it's supposed to create a table named using a variable in the database. I would like to be able to dynamically create and drop tables as real estate listings are added and deleted. I just tried it out and it didn't work. No errors but the table didn't appear in the db when I went to look using phpMyAdmin. Is there something wrong with my code or is what I'm trying to do not possible?
Source: http://www.livejournal.com/community/php/313804.html
-
Creating a table dynamically
Date: 06/29/05
(Web Development) Keywords: php, mysql, database, sql
I'm running this bit of PHP script that I'm writing:
$query = "CREATE TABLE 'mls" . $mls . "' ('id' INT NOT NULL AUTO_INCREMENT,'photo' VARCHAR(50) NOT NULL, PRIMARY KEY ('id'))";
$result = mysql_query($query) or die("Query failed : " . mysql_error());
The idea is that it's supposed to create a table named using a variable in the database. I would like to be able to dynamically create and drop tables as real estate listings are added and deleted. I just tried it out and it didn't work. No errors but the table didn't appear in the db when I went to look using phpMyAdmin. Is there something wrong with my code or is what I'm trying to do not possible?
Source: http://www.livejournal.com/community/webdev/216628.html
-
WordPress Patch Upgrade From 1.5.1.2 to 1.5.1.2 Made Available
Date: 06/30/05
(Java Web) Keywords: php, security
WordPress developers have posted yet another "security" upgrade. Again, as always, you have to delete everything (except wp-content/ and config.php) and re-install from scratch. If you are, like me, tired of these frequent upgrades (after having finally upgraded to 1.5.1.2) then this patch is for you. With this little patch (24K zipped) (assuming you are [...]
Source: http://blog.taragana.com/index.php/archive/wordpress-patch-upgrade-from-1512-to-1512-made-available/
-
XML processing
Date: 07/01/05
(PHP Community) Keywords: php, xml, database
Hi everyone, I am having some problems processing an XML document with PHP.
I know the XML doc is well formed and valid, I would post it but I cant seem to figure out how to post XML without it being processed. The structure of the document is as follows.
updates
franchise
CRH
SN
FID
CRH
CRH
SN
FID
CRH
CRH
SN
FID
CRH
franchise
updates
What I want, is to extract each CRH record with its SN and FID so that I can insert it into a database. I have been trying to use the DOM XML modules for PHP but the results I get are not what I expect. The documentation is a little sparse and I just learning XML so I was hoping you all might be able to help me out. When I extract 'franchise' I would expect that I would get a multi dimensional array from which I can pull the records. I dont seem to be getting that.
Any help on the correct procedures for this would be appreciated.
Source: http://www.livejournal.com/community/php/313981.html
-
Failure of PHP to work with Apache / MySQL
Date: 07/03/05
(PHP Community) Keywords: php, mysql, sql, google, apache
I turned on my computer last night and found that PHP was refusing to communicate with MySQL - I could make MySQL work through the command line and through Perl, but not through PHP. I checked everything that I could think of and everything I could find on google without any joy. I have spent about 8 hours messing with this now and I'm getting nowhere. I've uninstalled and reinstalled php & mod_php so many times today that I've lost count. My latest idea was to uninstall php, mod_php, and apache. I've reinstalled Apache, php, and mod_php (in that order) but now PHP refuses to work with Apache. I've added APACHE2_OPTS="-D PHP5" to the apache config in /etc/conf.d/apache2 but it hasn't made any difference.
I'm running Gentoo with Apache 2.0.54, PHP 5.0.4 (along with mod_php 5.0.4), and MySQL 4.0.24.
Does anyone have any ideas how I can make it work again as I'm going insane here and feel like throwing the computer out of the window...
Source: http://www.livejournal.com/community/php/314431.html
-
PHP/MySQL Import
Date: 07/03/05
(PHP Community) Keywords: php, mysql, sql, web
I have a dump file on the web server. How do I do a mysql import of that file. It's over 2MB and I can't use phpmyadmin because of that.
Source: http://www.livejournal.com/community/php/314649.html
-
Problems with SQL query
Date: 07/04/05
(PHP Community) Keywords: php, database, sql
Hi,
I am having problems with an SQL query not returning any rows. My table in my database is set up like:
ns_event_month INTEGER
ns_event_day INTEGER
ns_event_year INTEGER
(i'm leaving many fields out)
And here is part of my code. It returns zero rows, however there are 2 records in my database that are 5/6/2005 and 5/7/2005 (m/d/y). So there are 2 archived "events" already, but this query returns nothing.
http://www.welcometothenuclearage.com/shows.php (a link to the page that isn't working correctly)
I am currently displaying all the current shows my band has booked, but I want to show all the past shows. This was working fine until one day, and then it just stopped working. So I'm lost...
Any help is greatly appreciated.
Source: http://www.livejournal.com/community/php/314881.html
-
I'm not sure how to post this: Spy Sheriff Problem
Date: 07/04/05
(Computer Help) Keywords: php, browser, html, asp, spyware, microsoft
Hello. I'm not big on computers, only knowing how to do some HTML and how to surf, use some typing programs.
I encountered Spy Sheriff about a day ago and still am having problems.
Computer: Intell (R) Pentium
Microsoft Windows 2000
523,760 KB RAM
Browser used: Mozilla
On my Admin account, I have this black box with these red letters: SYSTEM STOPPED
White Text: System has been stopped due to a serious malfunction. Spyware activity has been detected.
It is recommeded [sic!] to use spyware removal tool to prevent data loss. Do not use the computer before all spyware removed.
I have on my other account, SM (not real account name), Spybot: S&D. Everytime I try to start up that account, I encounter Symantec Email on the fritz. It shows alot of pop windows open for email.
I have tried to run Spybot: S&D and Regedit to kill all of the Spy Shreiff stuff, but it is like a zombie, it keeps on coming back and won't die!
I only use Hotmail email, so not Microsoft Outlook-esque stuff.
I'll admit that I am not the brightest in the world, and I feel that I would look stupid if the other computer_help community approached my problem. The only reason I sought this community after reading the information page, was that the community mentioned even "someone's monitor being on fire" or "just need help sending email."
My cousin used to pad this computer, it is custom-built with firewalls and such, so much that I felt inhibited, but now I feel like it should be that way, but then again, I am not majoring in computers... =(
{EDIT: On some other LJ community, someone spoke of a porn thing popping up. --I found it...ugg...it installed an icon of some woman, and the text: Free XXX (sighs)
Now I downloaded some Spyware BeGone thing and so far I have 101 infections found.... =(
The symantec thing has stopped something has to be right on the SM account. Still working on solution...
EDIT as of 3:16PM Indiana time: I uninstalled "Spybot: S&D"...but now the SM account won't work...)
I've been reading stuff:
http://www.geekstogo.com/forum/index.php?act=ST&f=37&t=37021
http://forum.tweakxp.com/forum/Topic166292-29-1.aspx
http://pcpitstop.invisionzone.com/index.php?s=19fa3c3d0ac77a008487e6a5fdb39fb2&showtopic=92918&st=0entry946958
I wonder if I can actually get (the porn site popped up again) coolsearch.biz or something) the Hijack This to work, but isn't it obly for Internet Explorer? (sighs, wants to throw computer out window)
Source: http://www.livejournal.com/community/computer_help/435677.html
-
WordPress/Movable Type/CMS's
Date: 07/04/05
(WebDesign) Keywords: cms, php, css, web
Hey all,
I've been brushing up my rusty skills lately while working on a few side project websites. I had a few questions regarding publishing platforms and CMS's. I know a few adopt the technique to style and present via CSS then use a backend management system to manage the content. I see many sites using Movable Type and Wordpress for this and some coding their own CMS's. I'd like to be able to style up the site and structure it however I like, but then have some type of backend to power it all yet be easy to integrate.
- I was wondering if anyone had any recommendations for either or perhaps another easy to implement Publishing Platform/CMS to drop into small-medium size web projects? Which one is easier to integrate into a design from scratch and a rich feature set to maintain?
- Another question, anyone know of an open-source equal to something like Basecamp?
*EDIT*
- Reading up on each I've gathered a whole slew of new knowledge. One of the main differences I see now is WordPress' "Template Tags" aren't much more than PHP function calls and Movable Type have a full blown tag system. I am mainly looking at each system now based on their template systems and the template tags ease of use from the stand point of integrating your own desgin into it or creating a site from scratch with it built in. If anyone has switched from one system to the other I would love to hear your thoughts on why and how it worked out for you.
Thanks for any info.
Source: http://www.livejournal.com/community/webdesign/920424.html
-
PHP XMLRPC Remote Code Execution Vulnerability affecting Popular Blogging and CMS Platforms like WordPress 1.5.1.2 (and lower), PostNuke, Drupal, b2evolution TikiWiki etc.
Date: 07/05/05
(Java Web) Keywords: php, xml, web
PHPXMLRPC aka XML-RPC For PHP is a PHP implementation of the XML-RPC web RPC protocol, and was originally developed by Edd Dumbill of Useful Information Company. As of the 1.0 stable release, the project has been opened to wider involvement and moved to SourceForge. PHPXMLRPC is used in a large number of popular web applications [...]
Source: http://blog.taragana.com/index.php/archive/php-xmlrpc-remote-code-execution-vulnerability-affecting-popular-blogging-and-cms-platforms-like-wordpress-1512-and-lower-postnuke-drupal-b2evolution-tikiwiki-etc/
-
SQL Server Connection
Date: 07/05/05
(PHP Community) Keywords: php, asp, sql
Hi,
I have some php running in the latest php stable 4.x build on Windows 2003 Server in IIS6 in ISAPI mode.
My code does a mssql_connect, this previously was working fine, this week it has stopped working. I am unaware of any specific changes.
SQL Server is running on a non-standard port, on the localhost. Client Network Utility is configured to talk on the custom port, as is server network utility. ASP Code running in the same instance connects fine.
I have tried variations such as:
localhost
localhost,[port]
localhost:[port]
\\localhost\instancename,[port]
With no change.
Any suggestions?
Source: http://www.livejournal.com/community/php/315371.html
-
me & foreach don't get along..
Date: 07/06/05
(PHP Community) Keywords: php, database
I've got an array and a database. How do I check the data in the array against the database (basically to see if that piece of data exists in a specific field) and then show a message depending on whether it exists or not?
I figured it'd be something to do with the foreach() thingymajig.. but as expressed in the title, foreach() & me don't get along well.
Please excuse my n00bish-ness.. out of all things PHP, arrays & I have the most arguments. ;)
Source: http://www.livejournal.com/community/php/315574.html
-
Help!
Date: 07/06/05
(Web Development) Keywords: php, web
I have been driving myself crazy trying to figure this one out:
I'm using Suckerfish Dropdowns on this website, because I really hated the code that Fireworks and Dreamweaver auto-generates for their stupid drop-down menu "feature."
Open this in IE (I'm using some updated version of 6.0):
(the page)
Here is a link to the same file on a non-php server, so you can see the code:
(the code)
The second menu item from the right, "Teams," is the only drop-down item on the entire menu bar. It works with that link, and it works when "Keyword Index" or "Links & Resources" are selected from the lefthand gray navigation column. However, if you select "Document Index" or use the Search tool, the menu doesn't work. I've rewritten the PHP so that I know the variables used to generate the menu aren't being used anywhere else, and I still can't get it to work. I'm pretty much at the end of my mental resources on this one. Any help is greatly appreciated.
[x-posted between webdesign and webdev.]
Source: http://www.livejournal.com/community/webdev/217723.html
-
Help!
Date: 07/06/05
(WebDesign) Keywords: php, web
I have been driving myself crazy trying to figure this one out:
I'm using Suckerfish Dropdowns on this website, because I really hated the code that Fireworks and Dreamweaver auto-generates for their stupid drop-down menu "feature."
Open this in IE (I'm using some updated version of 6.0):
(the page)
Here is a link to the same file on a non-php server, so you can see the code:
(the code)
The second menu item from the right, "Teams," is the only drop-down item on the entire menu bar. It works with that link, and it works when "Keyword Index" or "Links & Resources" are selected from the lefthand gray navigation column. However, if you select "Document Index" or use the Search tool, the menu doesn't work. I've rewritten the PHP so that I know the variables used to generate the menu aren't being used anywhere else, and I still can't get it to work. I'm pretty much at the end of my mental resources on this one. Any help is greatly appreciated.
[x-posted between webdesign and webdev.]
Source: http://www.livejournal.com/community/webdesign/922281.html
-
One-to-many join?
Date: 07/06/05
(MySQL Communtiy) Keywords: php
I'm trying to figure out if this is possible. I have two tables with a one-to-many relationship. Table one is Projects. Table two is Investigators. There may be more than one investigator on a project. I'm looking for a way to perform a query (probably using a join) so that, instead of having:
Project 1 | Investigator 1
Project 1 | Investigator 2
I could get something like:
Project 1 | Investigator 1 | Investigator 2
I'm using PHP to run the query.
I've fiddled around with basic join syntax, but I can't get beyond the first setup. Is it possible, or just a pipedream?
Source: http://www.livejournal.com/community/mysql/61230.html
-
PHP_SELF versus SCRIPT_NAME
Date: 07/08/05
(PHP Community) Keywords: php
Apparently there is plenty of debate over which is better (more portable, best practice, preferred, etc.) What is the concensus? I've been using PHP_SELF since I first started using PHP, but lately I've had to convert some 3rd party applications, and found that only SCRIPT_NAME really worked 100% of the time. Digging deeper I found this to be common question, though I never had to deal with it until now: how should your script refer to itself?
Source: http://www.livejournal.com/community/php/316185.html
-
Form image verification thingy...
Date: 07/08/05
(PHP Community) Keywords: php
Does anyone know a free PHP pre-made script that'll do one of those form verification images (like the one found here http://geektools.com/whois.php).
I found one at the PHP resources site, but it's $10, and the graphic is horrid.
Thanks in advance!
Source: http://www.livejournal.com/community/php/316092.html
-
Webcam Chat program functionality....?
Date: 07/08/05
(Web Development) Keywords: php, asp, web, linux
A customer recently sent me a link and expressed interest in adding this functionality to his site.
I've never seen anything like this before, so I'm not really sure what this entails.
Here is the link he provided me with:
http://latinlifemates.com/services/webcam.asp
From what I understand, he wants to duplicate this "service" on his own site (a similar dating service). His site is php/Linux....If anyone has ever heard of anything like this, please give me some insight....This is not my usual brand of webdev. haha.
In case the link isn't working for some reason, here is a quick run-down:
It appears to be a service offered by a dating company, wherein a (male) client pays said dating company by the minute to chat on a webcam via MSN messenger with another (female) client.
Said dating company will arrange for the female to be at a certain location at a certain time, and the male will be able to video chat with her for a set period of time.
.....wtf? call me naiive, but I had no idea that this "video prostituting" actually existed (lol)
Anyway.....Thanks in advance if anyone can offer any information on things of this nature. :)
Source: http://www.livejournal.com/community/webdev/218447.html
-
PHP_SELF versus SCRIPT_NAME
Date: 07/08/05
(PHP Development) Keywords: php
Apparently there is plenty of debate over which is better (more portable, best practice, preferred, etc.) What is the concensus? I've been using PHP_SELF since I first started using PHP, but lately I've had to convert some 3rd party applications, and found that only SCRIPT_NAME really worked 100% of the time. Digging deeper I found this to be common question, though I never had to deal with it until now: how should your script refer to itself?
Source: http://www.livejournal.com/community/php_dev/59743.html
-
Is PHP Secure?
Date: 07/08/05
(Java Web) Keywords: php, software, java, security
After recent reports of several critical security vulnerabilities of PHP based software. I decided to take a closer look at the current state of security with PHP based products.
A casual search at Secunia revealed 1599 Secunia Security Advisories. In contrast Java has 225 security vulnerabilities and much younger .NET platform has 827.
PHP based products has [...]
Source: http://blog.taragana.com/index.php/archive/is-php-secure/