02-21-2010
trim() will remove leading and trailing spaces.
PS: I suggest you do a bit of your own research before posting. For example, at a minimum look at the PHP man pages of the commands you are using!
Also, this:
PHP Code:
$venue = $_GET[venue];
should be
PHP Code:
$venue = $_GET['venue'];
... for faster execution time.
I will leave it to you as an exercise to Google the net and find out why.
And please, do more of your own research before asking questions
If you get in the habit of looking at your log files when trouble shooting a problem, and also reading, at a minimum, the man pages of the PHP commands you are using, you will find that you actually will save more time v. less time.
Edit: I closed this thread because it is not related to MySQL; it is related to poor string formatting. If you wish to work on PHP string formatting, please start a new thread on a specific issue. Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
MySQL on my server is down....
I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock
Any suggestions?
Here's what I can't do:
can't be root
don't have physical access (do stuff via SSH)
reinstall MySQL (need to keep the current MySQL... (8 Replies)
Discussion started by: _hp_
8 Replies
2. Solaris
Can anyone help me find and replace blank rows in a file with a numeric value (ie blankrow=someTxtOrNumValue), the file is over 500,000 rows long so it would need to be the quickest way as I'll need to do this for multiple files...I would be greatfull for any suggestions....thanks
sample file:... (2 Replies)
Discussion started by: Gerry405
2 Replies
3. Web Development
Hi all,
I was wondering if anyone knew a good/safe way to update a single column in a table that could contain upto 8 million rows...
simple command like:
UPDATE set blah=foo where bar=XXX;
I will be running this on tables being written to and tables that have already been created.
... (3 Replies)
Discussion started by: muay_tb
3 Replies
4. Shell Programming and Scripting
Hey all, I have a list in the format ;
variable length with spaces
more variable information
some more variable information
and I would like to transform that 'column' into rows ;
variable length with spaces more variable information some more variable information
Any... (8 Replies)
Discussion started by: TAPE
8 Replies
5. UNIX and Linux Applications
Hello,
Met a problem when I tried to insert rows to MySQL database from an old book that fits my learning level (MySQL and Perl for the Web, by Paul DuBois, 2001). First, under mysql console I created a database: webdb and the table: todo. Then I draft the perl-cgi script to have online page.... (0 Replies)
Discussion started by: yifangt
0 Replies
6. Programming
I feel stupid for asking this because it seems that MYSQL code isn't working the way that I think it should work.
Basically I wrote code like this:
select * from `Test_DC_Trailer` HAVING max(DR_RefKey);
Where the DR_RefKey is a unique numeric field that is auto iterated (like a primary key)... (7 Replies)
Discussion started by: Astrocloud
7 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
My requisite is to split a single column of phonemes seperated by spaces into multiple rows.
my input file is:
a
dh
u
th
a
qn
ch
A
v
U
r
k
my o/p should be like:
adhu a dh u (3 Replies)
Discussion started by: girlofgenuine
3 Replies
8. Shell Programming and Scripting
Hi, i want to create a table automatically based on another table (sms_key).
For example;
If user create a new row with sms_keyword field: IRC then a table created automatically (with some field on it, like: name, ph_number, messages).
select * from sms_key;
+-------------+
|... (1 Reply)
Discussion started by: jazzyzha
1 Replies
9. Shell Programming and Scripting
Dear community,
I have to split string in table and list all values. I'll skip the code and jump directly to mysql query.
This is the table:
category title
======= =======
7,3 title 1
1,3 title 2
1,2,3 title 3
Now, what I need is split category into single... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
10. UNIX for Dummies Questions & Answers
Hello,
some member created 27000 posts in wrong section (lol :D) so i need to edit all his entries to get new section ID.
SELECT * FROM `phpbb_topics` WHERE `topic_first_poster_name` LIKE "%ozerway%";
this will select all his topics...
the column with forum id is named "forum_id" and... (3 Replies)
Discussion started by: postcd
3 Replies
LEARN ABOUT SUSE
php-config5
php-config(1) Scripting Language php-config(1)
NAME
php-config - get information about PHP configuration and compile options
SYNOPSIS
php-config [options]
DESCRIPTION
php-config is a simple shell script for obtaining information about installed PHP configuration.
OPTIONS
--prefix Directory prefix where PHP is installed, e.g. /usr/local
--includes List of -I options with all include files
--ldflags LD Flags which PHP was compiled with
--libs Extra libraries which PHP was compiled with
--extension-dir
Directory where extensions are searched by default
--include-dir Directory prefix where header files are installed by default
--php-binary Full path to php CLI or CGI binary
--php-sapis Show all SAPI modules available
--configure-options
Configure options to recreate configuration of current PHP installation
--version PHP version
--vernum PHP version as integer
SEE ALSO
php(1)
VERSION INFORMATION
This manpage describes php, version 5.3.2.
COPYRIGHT
Copyright (C) 1997-2006 The PHP Group
This source file is subject to version 3.01 of the PHP license, that is bundled with this package in the file LICENSE, and is available
through the world-wide-web at the following url:
http://www.php.net/license/3_01.txt
If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to
license@php.net so we can mail you a copy immediately.
The PHP Group 2006 php-config(1)