baseportal | ||
Start | ||
baseportal message board | |
Welcome to the baseportal message board... Please read the FAQ.
|
Selected message: | To the list |
Message from mamet on 12/31 2003, 20:03 +00:00 EMail: poeticsoul203@aol.com Black Planet Pagei have created a BP page, but i want to make it look different from what is normaly seen on BP. I've seen people hoosing their own backgrounds, putting various pictures and writing on them and i want to do thesame. Can you help me? |
|
All messages from this thread: | To the list |
Message from TheOneRing on 1/1 2004, 06:45 +00:00 EMail: theonering@thegateroom.com WWW: geocities.com/theonering_stargate Still having problem with spaces in a data fieldThis message is related to a previous post. I'm narrowing down the issue and believe I've found the root problem but don't know if/how to handle it with coding. My database has a field name "Title". Two entries in this field are: The Sun's Love The Line The variable field name "Title" is passed through a URL during a search as $Title. According to the baseportal documentation, you should handle spaces in a field query using \ like:
My problem is that I need to use the variable $Title in the query and it doesn't know if there are spaces in the field:
where $Title = The Sun's Love -->in one entry where $Title = The Line -->in the next entry The query "<loop Title==$Title>" will return "The Line" both times through the loop and never return "The Sun's Love". How do I handle spaces in a data field that will be used in a $field query? My exact code currently is below. The first "get" calls the database "Archive" which has the field "Title". The second "get" calls the relational database "Story" which has the field "Title" (maybe the same title more than once if a story has multiple chapters), the field "Chapter_number", and the field "Story". If the "Story" field is empty, it links to a web site. If the "Story" field has something in it, it returns a link to the baseportal database.
out "<tr><td align=\"left\" width=\"170\"><h3><a title=\"Select story title to link directly to the story\">Title</a></h3></td>"; out "<td align=\"center\" width=\"100\"><h3>Author</a></h3></td>"; out "<td align=\"center\" width=\"80\"><a title=\"Select rating to view categories and warnings\"><h3>Rating</h3></a></td>"; out "<td align=\"center\" width=\"80\"><h3>Size</h3></td>"; out "<td align=\"left\" width=\"500\"><h3>Description</h3></td></tr>"; while(get_next)
out "<tr valign=\"top\"><td align=\"left\" width=\"170\">";
|
Message from TheOneRing on 1/2 2004, 07:18 +00:00 EMail: theonering@thegateroom.com WWW: geocities.com/theonering_stargate Woo hoo, I got it!Figured out how to use perl to substitute characters. So, now I substitute a "\ " for every space in the title field. My $Title field is converted from "The Line" to "The\ Line" and I search using that with no more problems! TheOneRing |
Messages from 2850 to 3000: | To the input form |
> Still having problem with spaces in a data field from TheOneRing on 1/1 2004, 06:45 +00:00 Woo hoo, I got it! from TheOneRing on 1/2 2004, 07:18 +00:00 |
<< Newest messages | < Newer messages | To the input form | Older messages > | Oldest messages >> |
© baseportal.com. All rights reserved. Terms of use |