473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

textbox output

22
hello! i have a problem here will you please help me?.. this is my script

[PHP]

<?php

//$text = "Like '%american journal of med%'";

$text = $_POST["box"];
$sep = " ";
$out = strtok($text, $sep);

$output = " TI Like '%$out%' ";

$sql ="SELECT MSNEW.ID , MSNEW.UI , MSNEW.GID , MSNEW.IID , MSNEW.TI , MSNEW.TIYOMI , MSNEW.ORGYOMI , MSNEW.CY , MSNEW.PU , MSNEW.YR, MSNEW.ISSN, MSNEW.ACRONYM, MSNEW.ABBREVIATION, MSNEW.NOTE, MSNEW.VTI, MSNEW.VTI2, MSNEW.VTI3 FROM MSNEW WHERE ".$output;


echo $sql;


while ($out !== false)
{


$out = strtok(" ");

if ($out ==false) {
echo "AND";

}
}


function db_connect_ctlg()
{
$conn = odbc_connect("sys_foresta_ctlg", "sa", "");
if(!$conn)
{
// x借yP失z・写rfr(qz
return NULL;
}
else
{
return $conn;

}
}


function ExecInforestaQuery($query){

$Set=db_connect_ctlg();

if (!$Set)

{
echo "Connect Failer!!<BR>";
return NULL;
}
else
{
$query_result = odbc_exec($Set,$query);

if (!$Set)
{
echo "Query Failer!!<BR>";
return NULL;
}
else
{
return $query_result;
}
}
}

$XResult=ExecInforestaQuery($sql);

$x=0;
while($rec = odbc_fetch_array($XResult)){
$title=$rec['TI'];

$y=0;
$Count=0;
while($x>$y){
if ($a[$y][0]==$title){
$a[$y][1]=$a[$y][1]+1;
$Count=1;
}
$y=$y+1;
}

if ($Count==0){
$a[$x][0]=$title;
$a[$x][1]=1;
$x=$x+1;
}
}

$X=0;
while($X<$x){
//echo $a[$X][0]." </BR> ";
$X=$X+1;
}

odbc_free_result($XResult);

?>

[/PHP]

and i want this output..

- output -

SELECT MSNEW.ID , MSNEW.UI , MSNEW.GID , MSNEW.IID , MSNEW.TI , MSNEW.TIYOMI , MSNEW.ORGYOMI , MSNEW.CY , MSNEW.PU , MSNEW.YR, MSNEW.ISSN, MSNEW.ACRONYM, MSNEW.ABBREVIATION, MSNEW.NOTE, MSNEW.VTI, MSNEW.VTI2, MSNEW.VTI3 FROM MSNEW WHERE TI Like '%new%' AND Like '%eng%' AND Like '%jour%'

if i'm going to put the new eng jour at textbox.. the textbox output appear after the SELECT output..

please help me.. tnx!
Jan 30 '08 #1
8 2125
MarkoKlacar
296 Expert 100+
Hi,

I don't get you question, could you give me some more information?
Feb 6 '08 #2
Markus
6,050 Expert 4TB
What output do you get?
Feb 6 '08 #3
ifedi
60
and i want this output..

- output -

SELECT MSNEW.ID , MSNEW.UI , MSNEW.GID , MSNEW.IID , MSNEW.TI , MSNEW.TIYOMI , MSNEW.ORGYOMI , MSNEW.CY , MSNEW.PU , MSNEW.YR, MSNEW.ISSN, MSNEW.ACRONYM, MSNEW.ABBREVIATION, MSNEW.NOTE, MSNEW.VTI, MSNEW.VTI2, MSNEW.VTI3 FROM MSNEW WHERE TI Like '%new%' AND Like '%eng%' AND Like '%jour%'

if i'm going to put the new eng jour at textbox.. the textbox output appear after the SELECT output..

please help me.. tnx!

I'm not sure I get all you were trying to say! But looking at the output you said you want, I notice an SQL syntax error:

Expand|Select|Wrap|Line Numbers
  1. WHERE TI Like '%new%' AND Like '%eng%' AND Like '%jour%'
it should read:
Expand|Select|Wrap|Line Numbers
  1. WHERE TI Like '%new%' AND TI Like '%eng%' AND TI Like '%jour%'
I must confess I couldn't go thru the entire php code, but the SQL issue would surely prove important anyhow, when you get to that stage.
Best of luck.

Ifedi
Feb 8 '08 #4
ifedi
60
Hey,

And by the way, ehcy. Are you into medicine? I just noticed the title of the journal you were illustrating with. I am a medical doctor.

Ifedi.
Feb 8 '08 #5
ehcy
22
Hey,

And by the way, ehcy. Are you into medicine? I just noticed the title of the journal you were illustrating with. I am a medical doctor.

Ifedi.
sorry for late reply.. i'm working at medeical research company here in phils. and i'm under training for web design (programming).. nice to meet you sir
Feb 15 '08 #6
ifedi
60
sorry for late reply.. i'm working at medeical research company here in phils. and i'm under training for web design (programming).. nice to meet you sir
I'm sorry what and where's phils? Phillipines?
And have you gotten round to a solution for your problem (above)?
Feb 15 '08 #7
ehcy
22
I'm sorry what and where's phils? Phillipines?
And have you gotten round to a solution for your problem (above)?
hello.. i'm done with my problem before but i have a new one.. hehehe.. i want to add the details of the book.. for examples.. i will input the year, volume, issue #, and the author to each textbox and if i will click the DONE command button.. it will save to my database..
Feb 21 '08 #8
ehcy
22
Hi,

I don't get you question, could you give me some more information?

hello.. may i add you to my contact list.. 'cause i really need an programmer expert to help me do my problem regarding programming.. thanks
Feb 21 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Option^Explicit | last post by:
What I'm trying to do: Open a text file and display the contents in a text box (I've done this) Need to be able to edit the file from within the textbox and have it save back to the source...
6
by: Ketta | last post by:
I know how to read a file system object and output it to the browser page. The desired result would be to put that file into a textbox on the screen for a user to modify and then write the file...
4
by: Jeff Bangert | last post by:
How to turn it off? For example, this code TextBox1.Text = "hello"; puts "hello" in the TextBox, but it is highlighted. I want to turn off the highlighting. I have looked at every TextBox...
2
by: Mr.Baha | last post by:
Hello, I have a situation where I am appending text to a multi-line (rich)textbox in a C# form. Now depending on which event does the appendtext, i want to distinguish the lines in the textbox by...
22
by: Tim | last post by:
Hi A while ago I got some help in writing a mock console. The idea was to write a VB app that contained a textbox, then run a process from within the app and redirect the stdout to the textbox. ...
1
by: Wilson | last post by:
Hi, Would you give me a idea how to create a web control with two Textbox ? my code : namespace com.index.web.components {
1
by: rn5a | last post by:
I want to create a custom control that encapsulates a Button & a TextBox. When the Button is clicked, the user is asked a question using JavaScript confirm (which shows 2 buttons - 'OK' &...
2
by: sherifffruitfly | last post by:
Hi all, I'm using a multiline+scrollbar textbox to log output as my program runs. Basically, I pass a reference to the class instance that's currently doing stuff, and the instance can tack on...
0
by: Anonieko | last post by:
Are there any javascript codes there? Answer: Yes On the PageLoad event call InitialClientControsl as follows /// <summary> /// This will add client-side event handlers for most of the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.