Jump to content

f1r3fl3x

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by f1r3fl3x

  1. Thx @kickstart, i don't know sql that good, i''m a lot better in php, but you can't use one without the other. So, i need this code for a search form, to pick up results from the database and order them by match. Is the code you ggave me going to work?
  2. How does a search script fetch results when the db has over 450 000 entries in different tables in the database (http://metrolyrics.com). In my database i have abot 300 000 entries and i wanted to make a search script, but i failed. Here's my code. Someone please HELP :'( SELECT count(*) as woo FROM `a`, `a_songs`, `b`, `b_songs`, `c`, `c_songs`, `d`, `d_songs`, `e`, `e_songs`, `f`, `f_songs`, `g`, `g_songs`, `h`, `h_songs`, `i`, `i_songs`, `j`, `j_songs`, `k`, `k_songs`, `l`, `l_songs`, `m`, `m_songs`, `n`, `n_songs`, `o`, `o_songs`, `p`, `p_songs`, `q`, `q_songs`, `r`, `r_songs`, `s`, `s_songs`, `t`, `t_songs`, `u`, `u_songs`, `v`, `v_songs`, `w`, `w_songs`, `x`, `x_songs`, `y`, `y_songs`, `z`, `z_songs`, `1`, `1_songs` WHERE (`a`.`title` LIKE '%aba%') OR (`a_songs`.`title` LIKE '%aba%') OR (`b`.`title` LIKE '%aba%') OR (`b_songs`.`title` LIKE '%aba%') OR (`c`.`title` LIKE '%aba%') OR (`c_songs`.`title` LIKE '%aba%') OR (`d`.`title` LIKE '%aba%') OR (`d_songs`.`title` LIKE '%aba%') OR (`e`.`title` LIKE '%aba%') OR (`e_songs`.`title` LIKE '%aba%') OR (`f`.`title` LIKE '%aba%') OR (`f_songs`.`title` LIKE '%aba%') OR (`g`.`title` LIKE '%aba%') OR (`g_songs`.`title` LIKE '%aba%') OR (`h`.`title` LIKE '%aba%') OR (`h_songs`.`title` LIKE '%aba%') OR (`i`.`title` LIKE '%aba%') OR (`i_songs`.`title` LIKE '%aba%') OR (`j`.`title` LIKE '%aba%') OR (`j_songs`.`title` LIKE '%aba%') OR (`k`.`title` LIKE '%aba%') OR (`k_songs`.`title` LIKE '%aba%') OR (`l`.`title` LIKE '%aba%') OR (`l_songs`.`title` LIKE '%aba%') OR (`m`.`title` LIKE '%aba%') OR (`m_songs`.`title` LIKE '%aba%') OR (`n`.`title` LIKE '%aba%') OR (`n_songs`.`title` LIKE '%aba%') OR (`o`.`title` LIKE '%aba%') OR (`o_songs`.`title` LIKE '%aba%') OR (`p`.`title` LIKE '%aba%') OR (`p_songs`.`title` LIKE '%aba%') OR (`q`.`title` LIKE '%aba%') OR (`q_songs`.`title` LIKE '%aba%') OR (`r`.`title` LIKE '%aba%') OR (`r_songs`.`title` LIKE '%aba%') OR (`s`.`title` LIKE '%aba%') OR (`s_songs`.`title` LIKE '%aba%') OR (`t`.`title` LIKE '%aba%') OR (`t_songs`.`title` LIKE '%aba%') OR (`u`.`title` LIKE '%aba%') OR (`u_songs`.`title` LIKE '%aba%') OR (`v`.`title` LIKE '%aba%') OR (`v_songs`.`title` LIKE '%aba%') OR (`w`.`title` LIKE '%aba%') OR (`w_songs`.`title` LIKE '%aba%') OR (`x`.`title` LIKE '%aba%') OR (`x_songs`.`title` LIKE '%aba%') OR (`y`.`title` LIKE '%aba%') OR (`y_songs`.`title` LIKE '%aba%') OR (`z`.`title` LIKE '%aba%') OR (`z_songs`.`title` LIKE '%aba%') OR (`1`.`title` LIKE '%aba%') OR (`1_songs`.`title` LIKE '%aba%') LIMIT 0,15
  3. Can someone help me. I started learning ajax a week ago and i don't know much. I tryed to create a submit form with POST but it didn't work. Please someone help me. Here's the code. form.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="style.css"> <script type="text/javascript" language="javascript"> var http_request = false; function show_hint ( p_hint_text, p_span ) { document.getElementById(p_span).innerHTML = p_hint_text ; } function makePOSTRequest(url, parameters, SpanName) { http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Cannot create XMLHTTP instance'); return false; } http_request.onreadystatechange = function() { if (http_request.readyState == 4) { if (http_request.status == 200) { //alert(http_request.responseText); result = http_request.responseText; document.getElementById(SpanName).innerHTML = result; document.getElementById('status').innerHTML = 'Ready'; } else { alert('There was a problem with the request.'); } } }; http_request.open('POST', url, true); http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http_request.setRequestHeader("Content-length", parameters.length); http_request.setRequestHeader("Connection", "close"); http_request.send(parameters); } function Contact(obj,SpanName) { var curDateTime = new Date(); //For IE var poststr = "name=" + encodeURI( document.getElementById("name").value ) + "&email=" + encodeURI( document.getElementById("email").value ) + "&uniqueID=" + curDateTime + "&msg=" + encodeURI( document.getElementById("msg").value ) ; var SpanName = SpanName; //alert (SpanName); makePOSTRequest('Process.php', poststr, SpanName); } </script> </head> <body> <span id="myspan"> <table width="316" border="0" cellpadding="4" cellspacing="0"> <form name="ContactForm" id="ContactForm" action="javascript:Contact(document.getElementById('ContactForm'),'myspan');show_hint('Sending Data... Please wait!', 'status');" method="post"> <tr> <td width="141" align="right" >Name:</td> <td width="157"><input name="name2" type="text" id="name" size="20" maxlength="50" /></td> </tr> <tr> <td align="right" >Email:</td> <td><input name="email2" type="text" id="email" size="20" maxlength="50" /></td> </tr> <tr> <td align="right">Message:</td> <td><input name="msg2" type="text" id="msg" size="20" maxlength="50" /></td> </tr> <tr> <td align="right"> </td> <td><input name="Submit2" type="submit" value="Submit" /></td> </tr> </form> </table> </span> </body> </html> Process.php <?php $name = stripslashes($_POST['name']); $email = stripslashes($_POST['email']); $msg = stripslashes($_POST['msg']); echo " <table width=\"316\" border=\"0\" cellpadding=\"4\" cellspacing=\"0\"> <tr> <td align=\"left\">Your Information has been processed</td> </tr> <tr> <td align=\"left\">Name: $name <br> Email: $email <br> Message: $msg</td> </tr> </table>"; ?> :'(
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.