Go Back   Science Forums > Physical Sciences Forums > Computer Science and Technology
Reply
 
LinkBack Thread Tools
Old 04-04-2008   #1 (permalink)
InfiniteNow's Avatar
Suspended


Location:
Austin, TX
 
InfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond repute
 



Not Ranked  0 score     
In a PHP based url, can a search term use a wildcard?

I've got a report function in our local training system, where we enter the manager ID of a group, then the course code. This will pull who in that managers group has completed that course code and who has not.

I'm trying to find a way to replace putting a (or multiple) specific course code (or codes) with a "begins with" logic that will pull all course codes beginning with a certain term.

However, I've messed around a bit with wildcards (like * and %), but either the wildcards don't work, or my syntax is wrong.



An example of an actual report url for a specific manager and a specific course is as follows:

http: //OurTrainingSite/reports/mgr_drill_multi.php?mgrid=IDgoesHere&QS_crse_codes =ExactCourseCode


What I want is a way to do something similar, but with "QS_crse_codes" begins with "CodePrefix."

Any ideas of syntax to try?



If I can't get it to work this way, I'll just ask our DEV team to create a new report type with this logic, but my hope is that I can leverage existing functionality without the need for a production change request. My skills are limited, and this may not even be possible, but I figured it could not hurt to ask.

Any and all ideas are welcome. Cheers.
Reply With Quote
Old 04-04-2008   #2 (permalink)
InfiniteNow's Avatar
Suspended


Location:
Austin, TX
 
InfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond repute
 



Not Ranked  0 score     
Yeah... Never mind

Ah... bugger. Prolly not gonna be able to do unless it's arlready programmed in or I get access to the code itself.
Reply With Quote
Old 04-05-2008   #3 (permalink)
Tormod's Avatar
Hypographer

Administrator
Senior Editor
Editor
Dev Team Member

Location:
Oslo, Norway
 
Tormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond repute
 



Not Ranked  0 score     
Re: Yeah... Never mind

Wouldn't this be done on SQL level with something like

$coursecode = $_GET['QS_crse_codes'];

SELECT bla bla
FROM blabla
WHERE tblQS_crse_codes LIKE "$coursecode%";


----------------
Your Friendly Neighborhood Administrator

Want to lose the advertisements? Become a Sponsor!

Join our Facebook group or follow us on Twitter

Science is not only compatible with spirituality; it is a profound source of spirituality.
- Carl Sagan
Reply With Quote
Old 04-07-2008   #4 (permalink)
alexander's Avatar
Dedicated Smart-ass

Senior Moderator
Gallery Curator
Dev Team Member

Location:
Just before 0xAA55
 
alexander has a reputation beyond reputealexander has a reputation beyond reputealexander has a reputation beyond reputealexander has a reputation beyond reputealexander has a reputation beyond reputealexander has a reputation beyond reputealexander has a reputation beyond reputealexander has a reputation beyond reputealexander has a reputation beyond reputealexander has a reputation beyond repute
Send a message via AIM to alexander
 



Not Ranked  0 score     
Re: Yeah... Never mind

no, T, i think that is what he is trying to avoid doing.

Infy, it's all in how the search function is implemented, if it's looking for an exact value, and the code is written appropriately, then no matter what you try to do, you will not be able to search for a wild string. As T said, it's in the sql statement, if it says "like" then any search is going to be wild stringed, but if it says = then you can use speciffic wild string symbols. The problem is that a good developer will put a decent checking system in place to prevent people from making arbitraty strings for use with SQL injection, so all of the special database symbols will be replaced or backslashed, so you can't do the magic sql injection deed...

i would suggest getting the code and implementing it in there, in some sort of way (would depend on what is currently being done)


----------------
Microsoft, the leader in using innovative tactics to promote irksome experience, coupled with antiquated technology that's held together by a pyramid of makeshift afterthoughts.

Apple, the leader in using irksome tactics to promote innovative experience, coupled with an antiquated core that's enhanced by state-of-the-art afterthoughts.

Linux, the leader in not using any tactics to promote user-defined experience, coupled with state-of-the-art core enhanced by innovative afterthoughts.

Reply With Quote
Old 04-07-2008   #5 (permalink)
InfiniteNow's Avatar
Suspended


Location:
Austin, TX
 
InfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond reputeInfiniteNow has a reputation beyond repute
 



Not Ranked  0 score     
Re: In a PHP based url, can a search term use a wildcard?

Yeah, that's correct. We will need to leave the existing report as is. What I will have done is to create another report, very parallel to the existing, but with "begins with string" logic instead of "equals exact code" logic. Then, I can publish that new report on the same end user page as the existing report so both are available.

Thanks again guys. I had a feeling that this was not something I could do with existing code, but you've definitely made me more comfortable that it won't be hard to make happen.


Cheers.
Reply With Quote
Old 04-07-2008   #6 (permalink)
Tormod's Avatar
Hypographer

Administrator
Senior Editor
Editor
Dev Team Member

Location:
Oslo, Norway
 
Tormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond reputeTormod has a reputation beyond repute
 



Not Ranked  0 score     
Re: In a PHP based url, can a search term use a wildcard?

Ah, I see. Well! Something to wrap my brain around.


----------------
Your Friendly Neighborhood Administrator

Want to lose the advertisements? Become a Sponsor!

Join our Facebook group or follow us on Twitter

Science is not only compatible with spirituality; it is a profound source of spirituality.
- Carl Sagan
Reply With Quote
Reply

Bookmarks

Tags
search, url, wildcard


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Short term and long term memory. converting and such. Theory5 Psychology 0 10-15-2007 12:30 PM
Non Carbon based life Moontanman Biology 19 05-02-2007 02:41 AM
Long Term Space Enviroment. KickAssClown Space 21 10-17-2006 07:30 AM
Realism: Evolution-Based coberst Philosophy Forums 4 09-16-2006 02:19 AM
Long term information storage FrankM Computer Science and Technology 11 12-08-2004 10:31 AM

» Advertisement
» Current Poll
Who's the sexiest man alive? Johnny Depp or Robert Pattinson?
Johnny Depp - 30.00%
3 Votes
Robert Pattinson - 0%
0 Votes
Someone else (please specify) - 40.00%
4 Votes
I'm too macho to think a guy is sexy - 30.00%
3 Votes
Total Votes: 10
You may not vote on this poll.


All times are GMT -8. The time now is 04:55 PM.

Hypography?

Hypography [n.]: A combination of "hyperlink" and "bibliography" - ie, a list of links to electronic documents. Comparable to discography and bibliography, but not cartography.

We have been online since May 2000, and aim to be the best place to find and share science-related content of all kinds.

Share the love!

Please add more science to your life. Use our RSS feeds on your blog, your portal, or your favorite feedreader!


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
Copyright © 2000-2009 Hypography
Part of the Hypography - Science for Everyone Network