Announcement

Collapse
No announcement yet.

SQL search

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sim
    replied
    Originally posted by Sakuya View Post
    Well, let's just leave it at that. No need to waste precious bytes of IndigoRoses database server on this anymore, right?
    Agreed that sounds good to me :yes

    Leave a comment:


  • Sakuya
    replied
    Originally posted by sim View Post
    his reply does not help not me or anyone
    It doesn't help you but it doesn't hurt to have it there, although a slim chance someone might find it useful.

    Beginners learn through examples.

    Originally posted by sim View Post
    you don't formate php like that its bad practices
    I don't see a single problem with it. How is his code bad practice? Are you saying that because vBulletin cuts out the formatting if you don't use PHP tags?

    Originally posted by sim View Post
    I never asked for php or mysql there for I am not using a remote program and I don't see why I would its a local book program.
    Maybe he misunderstood or didn't read the whole thread.

    Well, let's just leave it at that. No need to waste precious bytes of IndigoRoses database server on this anymore, right?

    Leave a comment:


  • sim
    replied
    When I said I am done on this topic means I am done, his reply does not help not me or anyone you don't formate php like that its bad practices, I never asked for php or mysql there for I am not using a remote program and I don't see why I would its a local book program.

    Leave a comment:


  • Sakuya
    replied
    Originally posted by sim View Post
    Look Dol I already said the app was done and released and your code was no way helpful I am n00b and php and I still would not right my code like that if you read what I put you would of seen I done what was needed and the topic did not need any more help that is not a local seach that is a remote search its using php when do you know a PC by defualt using php your file was all wrong and it was not helpful sorry if that hurts your feelings but I did say I WAS COMPLETED there now no more need for any more posts and that is not going to work for me as i am NOT using mysql I am using the build in SQL and the problem was arleady answed sorry but 21 posts shows me you don't understand AMS yet as I not seen anything from your self to prove this, is I am been blunt here and Sorry but I did say it was done please stop replying to this post not unless you have some new uba way to do something that the best of the best have not already posts Retest and Jim are know users and I will always take way they say over any new comer that replied the a PHP file over a lua fucntion for one !
    I don't see anything wrong with the code.

    It's likely that the code is stopped in the middle to give you the chance to show things from the result set that was just grabbed.

    And the database connection isn't done incorrectly either as the PHP website says:
    Originally posted by http://uk2.php.net/mysql_connect
    The link to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling mysql_close().
    Anyway, every little helps. Maybe someone else will come across this thread and have an idea for a multi-user cloud-based book database and that PHP code might help them with getting results from the database.

    The only thing messy about that code is that he didn't use [php][/php] tags.

    Leave a comment:


  • sim
    replied
    Look Dol I already said the app was done and released and your code was no way helpful I am n00b and php and I still would not right my code like that if you read what I put you would of seen I done what was needed and the topic did not need any more help that is not a local seach that is a remote search its using php when do you know a PC by defualt using php your file was all wrong and it was not helpful sorry if that hurts your feelings but I did say I WAS COMPLETED there now no more need for any more posts and that is not going to work for me as i am NOT using mysql I am using the build in SQL and the problem was arleady answed sorry but 21 posts shows me you don't understand AMS yet as I not seen anything from your self to prove this, is I am been blunt here and Sorry but I did say it was done please stop replying to this post not unless you have some new uba way to do something that the best of the best have not already posts Retest and Jim are know users and I will always take way they say over any new comer that replied the a PHP file over a lua fucntion for one !

    Leave a comment:


  • dolcevita270301
    replied
    Originally posted by sim View Post
    Why would I be using a remote file for a local app? and where did I say i am using php or mysql? I am using sql not mysql and I did say I have compleated it and its released ? and why would I be check all that in the remote file when I would want to check it before even sending it to the remote file? thanks for trying to help but next time READ what someone put now that said this topic is done Retest, JimS & web helped out where I needed but thanks anyway peace out.

    P.S use the php or code tags when posting code it makes it much easier to read also look up the right way to call and write php and mysql there is no need to close you php and then re open it and why would you leave the connection open to the database your way of doing it kinda old and messy just thought I would point that out
    Ok...This is just a part of php code I wrote in the pass to perform a local search. Nobody put a gun to your head and said "Do what I'm saying to you!" ... It's just an idea.
    READ what someone put
    Believe me, I hate this kinda comments!. JUST KNOW, THAT SOMEONE TOOK SOME MINUTES OF HIS TIME JUST TRYING TO HELP YOU.
    You have the right not to be ok with it, but still be nice!!!!

    Leave a comment:


  • sim
    replied
    Why would I be using a remote file for a local app? and where did I say i am using php or mysql? I am using sql not mysql and I did say I have compleated it and its released ? and why would I be check all that in the remote file when I would want to check it before even sending it to the remote file? thanks for trying to help but next time READ what someone put now that said this topic is done Retest, JimS & web helped out where I needed but thanks anyway peace out.

    P.S use the php or code tags when posting code it makes it much easier to read also look up the right way to call and write php and mysql there is no need to close you php and then re open it and why would you leave the connection open to the database your way of doing it kinda old and messy just thought I would point that out
    Last edited by sim; 11-14-2010, 11:17 AM.

    Leave a comment:


  • dolcevita270301
    replied
    Originally posted by sim View Post
    Sorry I forgot to stay Its all fixed and the program is released but thanks for the feed back, at the point of my last post I already removed the encrtions the fault was else where was no updating the listbox but its all working now.
    <?php

    //Assuming that you have a table named "dvd" with (ref, name and description) rows


    require_once("connexionMysql.inc.php"); //"connexionMysql.inc.php" is your host, data and password information
    if(isset($_GET['cle']) && !empty($_GET['cle']) && (strlen($_GET['cle'])>=5)) //$_GET['cle'] variable is your Input(search) -- strlen function to put at least 5 characters to validate the search
    $query="SELECT ref,name FROM dvd WHERE ref LIKE '%".$_GET['cle']."%' ";
    else
    $query="SELECT * FROM dvd WHERE description LIKE 'null' ";

    $result=mysql_query($query);
    ?>



    <?php while($articles=mysql_fetch_array($result)) {

    if (empty($_GET['cle'])){ echo ""; } else{ echo $articles['ref'];}
    elseif (empty($_GET['cle'])){ echo ""; } else{ echo $articles['nom'];}
    elseif (empty($_GET['cle'])){ echo ""; }else{ echo $articles['ref']; }

    }
    ?>

    Leave a comment:


  • sim
    replied
    Sorry I forgot to stay Its all fixed and the program is released but thanks for the feed back, at the point of my last post I already removed the encrtions the fault was else where was no updating the listbox but its all working now.

    Leave a comment:


  • rexxarspain
    replied
    t like others said, if u have encryption to database u cannot search inside cause the encription change the whole word if only one change ex:

    My House=7f8e48ca1e9e565dd908cbb9754339de
    my house=141bfcc05adbeb0e03ffc25d61b2769f
    my hous=4498595e702d93dcaaaee1003a2d9b84

    Only one letter change the wole text, then never match.

    Now if u remove the encryption u have to delete all Enc/Dec scripts to read normal strings and make it work.

    Code:
    "SELECT * FROM bookstore where " .. sData.. " like '%" .. sText .. "%'"

    Leave a comment:


  • sim
    replied
    Thanks for all your help, I removed all encryption from the app and and tried the like statemeant but its not doing anything anymore lol. broken dead now.

    Leave a comment:


  • sim
    replied
    I am going to convert the hole database decrypt it then I just encrypt the hole files not the small parts just not sure how to make do this fast all in one go

    Leave a comment:


  • webultra
    replied
    Maybe you can try adding a new column named "keywords"

    Leave a comment:


  • sim
    replied
    Really not sure that to do then, unless I return the hole thing decrypt it then check but thats would be a painful way around

    Leave a comment:


  • webultra
    replied
    Yes but no, lol. Even if you use string.tolower it won't retrieve any result. That's because the encrypted version of "hello" isn't the same as "hel" (for example hello=FDJSKFJDS, he=FYIOTRY and hel=EWQDS)

    Leave a comment:

Working...
X