PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Iron Speed
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old July 2nd, 2002, 08:27 AM
fumi fumi is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Japan
Posts: 9 fumi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP/MySQL Search Tutorial

Hi there,

I have been working through this article on PHP/MySQL Search at DevArticles.

http://www.devarticles.com/content....cleId=79&page=1

I have worked through the tutorial and haven't received any errors at all from either MySQL or PHP.

However, when I reached the end of the tutorial and type in 'MySQL' it only brings back one result even though it should be two.

If I enter 'MySQL Apache', it still only brings back one result, when it should be three.

I haven't altered the scripts in any way at all, as I am a real newbie.

Please can anyone help me,

Thanks

Reply With Quote
  #2  
Old July 2nd, 2002, 06:21 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Hi Fumi,
Did you create all of the required rows in the MySQL table? What I would suggest is taking the MySQL queries from the PHP script and run them against the database using the MySQL console application if you can, this way you can see if its the queries or the script that isn't working.

That tutorial was written a while back and as such was written for PHP 4.1. Which version of PHP are you using? If it's 4.2 then you may need to change some of the globally dependant variable declerations, etc.

Reply With Quote
  #3  
Old July 3rd, 2002, 02:36 AM
fumi fumi is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Japan
Posts: 9 fumi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Checked tables

I did check these sql tables. As I have been trying this script, I believe the PHP is at fault somehow. No matter how many keywords or articles I add, the script will only ever bring back the last one.

I.e, if I insert 'MySQl' 1,2,3 (indicating that 'MySQL' is available in three articles) then the script will only bring back article three etc.

If I run update so that it reads ( 'MySQL' 1,2 ), then keying in MySQL will only bring back article two. The constant factor is that the script only seems to want to bring back one result and that result is always the last one.

I am running PHP 4.2.1

Fumi

Reply With Quote
  #4  
Old July 3rd, 2002, 02:52 AM
fumi fumi is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Japan
Posts: 9 fumi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem solved

Somebody found a solution for me.

PHP:
------------------------------------------------------------------------


$articles*=*array_unique($articles);


------------------------------------------------------------------------
This was wiping the other entries that was being stored.

Thanks again,

Fumi

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > PHP/MySQL Search Tutorial


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway