
AndyPSV
Members-
Posts
99 -
Joined
-
Last visited
Everything posted by AndyPSV
-
I've got query. SELECT * FROM '.PRFX.'sell WHERE draft = "0" '.$e_sql.' AND ID NOT IN (SELECT id_ FROM '.PRFX.'skipped WHERE uid = "'.$u.'") AND ID NOT IN (SELECT id_ FROM '.PRFX.'followed WHERE uid = "'.$u.'") ORDER BY raised DESC '.$sql_limit; I want to add 3 records by the lowest number of refreshes; best on 5th position they must be unique (so if you connect two UNION ALL...)
-
It's done. SELECT DISTINCT sell.*, follow.id as followid FROM '.PRFX.'sell sell JOIN '.PRFX.'followed follow ON follow.id_ = sell.id WHERE draft = "0" AND follow.uid = "'.$u.'" ORDER BY follow.id DESC '.$sql_limit;
-
Yeah, but I get '1 2 3 4' IDs instead of original sell.id's i.e. 12 14 16 19
-
I want to preserve ORIGiNAL sell.id instead of id: '1 2 3 4 etc.'
-
Examples mess my original ID (from sell table) and i MUST preserve it. How to do it (Still waiting for an answer)?
-
I've got. SELECT DISTINCT * FROM '.PRFX.'sell sell JOIN '.PRFX.'followed follow ON follow.id_ = sell.id WHERE draft = "0" AND follow.uid = "'.$u.'" ORDER BY follow.id DESC '.$sql_limit that orders table, but it messes with the original '.PRFX.'sell ID (exchanging it with the follow.id) How to make it back to the original one?
-
Found already an answer. SELECT DISTINCT * FROM '.PRFX.'sell sell JOIN '.PRFX.'skipped skip ON skip.id_ = sell.id WHERE draft = "0" AND skip.uid = "'.$u.'" ORDER BY skip.id DESC
-
I've got. SELECT * FROM '.PRFX.'sell WHERE draft = "0" AND id IN (SELECT id_ FROM '.PRFX.'skipped WHERE uid = "'.$u.'") And want to order by ID field (DESC) from '.PRFX.'skipped' How to do it?
-
I've got a code that searches TEXT in search of e-mail addresses, i.e. "[email protected]" etc. and replaces it, with the phrase I want (<a href='mailto: X' with some style=''></a>) How to turn it into preg_replace() ?
-
//$x = ereg_replace('[-a-z0-9!#$%&\'*+/=?^_`{|}~]+@([.]?[a-zA-Z0-9_/-])*','<a href=\'mailto:\\0\' '.$style.'>\\0</a>',$x); For true, how (to update the code)
-
[jquery] Onmouseover Opacity Layer except selected block (overlay)
AndyPSV replied to AndyPSV's topic in Javascript Help
Found answer already on other forums. http://jsfiddle.net/LYcm9/5/ Thanks- 1 reply
-
- jquery
- javascript
-
(and 1 more)
Tagged with:
-
I want when onmouseover on particular section to put an OPACITY #fff 0.2 layer on everything except the selected class i.e. table Similarly as you have: .tableHighlight:hover{background-color:#eee} <table id='table-main' class='tableHighlight'> ... but inversed (puts layer on everything else, but not the table itself) --- http://jsfiddle.net/LYcm9/1/
- 1 reply
-
- jquery
- javascript
-
(and 1 more)
Tagged with:
-
I've added function PAGE($md='',$md2='',$md3='',$md4='') { global $db; and it works...
-
I've read the part that you want to delete a row AFTER clicking checkbox, so you need JQUERY. https://www.google.pl/search?q=php+deleting+rows+checkbox&oq=php+deleting+rows+checkbox&aqs=chrome..69i57j0l2.4236j0j1&sourceid=chrome&es_sm=93&ie=UTF-8 It's simply to be done. http://blog.themeforest.net/tutorials/deleting-multiple-records-with-php/ 1. Firstly: use var_export($_POST); die; to see what it shows/ to get what you're receiving: then, delete it in DB It's simple.
-
because you want to trigger an event php is static on the website: it's only subjected to PARSING the sent data You can do it with HTML, but would require to click SUBMIT some sort of (input). You want to do it, without -> jquery (javascript) The last, basically: listens & when the checkbox is ticked: it submits the form or directs to a link (even behind the layer of website) to do job wanted by you.
-
<input onclick="window.href=... You must trigger a jquery (javascript) mechanism to submit the form/ or open a link in order to achieve it. https://www.google.pl/search?q=jquery+oncheck+checkbox&oq=jquery+oncheck&aqs=chrome.1.69i57j0l5.9299j0j1&sourceid=chrome&es_sm=93&ie=UTF-8
-
Hello, maybe back to basics, but pobierz, plaintext $db = new PDO('mysql:host=localhost;dbname=andypsv_cocain','root','',array(PDO::ATTR_PERSISTENT=>true)); $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC); define('PRFX','drug_'); class PAGE { var $_t,$_k,$_d,$_c,$_nav,$_,$tpl,$u,$md; function PAGE($md='',$md2='',$md3='',$md4='') { $q = $db->query('SELECT * FROM `'.PRFX.'c0'.LG.'`'); if($q->rowCount() == 0) die(_E.'no categories'); while($_c0 = $q->fetch()) $c0[] = $_c0; $this->tpl->assign('c0',$c0); ... PRZY CZYM... INNE KLASY. class HELP extends PAGE { function i() { // I want to use here $db->query How to handle this issue to use class $db inside other classes? Up to this point I've used solely functions so it worked smoothly (i.e. mysql_query() alias). How?
-
preg_replace('#[0-9]+\.+[0-9]#i','',$cart['unit']); solved
-
eregi_replace('[0-9]+\.+[0-9]','',$cart['unit']); How to change it to preg_replace? I get an error: Warning: preg_replace() [function.preg-replace]: Unknown modifier '+' in ---
-
code to download: http://xernt.com/_xernt/_xernt.zip (as attachment failed to upload)
-
http://xernt.com/_xernt/ I've got few issues (see the attachment below to download code). 1. Autoresize of textarea box & size CODE for textarea resize exists, but it produces errors. var Editor = $("#" + element + "_ifr").contents().find("html"); var Wrapper = $("#" + element + "_ifr"); $("body", Editor).css('min-height', frameHeight+ "px"); if ($(Editor).prop('scrollHeight') >= settings.minHeight) Wrapper.height($(Editor).prop('scrollHeight')); else Wrapper.height(settings.minHeight); ------- in: (which was removed) function resizeEditor(element){ } (line 25 in code) */ it produces problems with toolbar; second issue with this, is the fact that it does EMPTY SPACE BELOW the textarea, which is required to be removed (as on the picture) 2. When selected: "Insert Link" it doesn't searches, despite that nothing has been changed and search works on the page: http://xernt.com/Whats-the-true-purpose-of-Xernt#1 login: [email protected] password: [email protected] Besides, it also make disappear of "Add Answer" button. 3. Toolbar disappears when selected "Edit" (please login on that page & select to EDIT answer). "This is a test answer." * select Edit when onmouseover on it. 17629_.zip
-
How to replace only links which aren't in <a href=''></a> brackets
AndyPSV replied to AndyPSV's topic in Regex Help
I've got a code: <p><span style="color: #222222; font-family: arial, sans-serif; font-size: 13px; line-height: normal; background-color: rgba(255, 255, 255, 0.917969);">View the reply at: </span><a style="color: #1155cc; font-family: arial, sans-serif; font-size: 13px; line-height: normal; background-color: rgba(255, 255, 255, 0.917969);" href="http://www.phpfreaks.com/forums/index.php?topic=354157.new;topicseen#new" target="_blank">http://www.phpfreaks.com/forums/index.php?topic=354157.new;topicseen#new<br /><br /></a>adsdsadsa<br /><br />http://link1.com/<br /><br />www.link2.com<br /><br /> </p> I've used: function rplLnk($x,$style='') { /* $x = ereg_replace('[-a-z0-9!#$%&\'*+/=?^_`{|}~]+@([.]?[a-zA-Z0-9_/-])*','<a href=\'mailto:\\0\' '.$style.'>\\0</a>',$x); $x = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href='\\0\' $style>\\0</a>", $x); $x = preg_replace(',(?<!//)www\.[^<>[:space:]]+[[:alnum:]/],i','<a href="http://\0">\0</a>',$x); */ $x = ereg_replace('[-a-z0-9!#$%&\'*+/=?^_`{|}~]+@([.]?[a-zA-Z0-9_/-])*','<a href=\'mailto:\\0\' '.$style.'>\\0</a>',$x); $x = preg_replace(',(?<!//)www\.(?>[^<>[:space:]]+[[:alnum:]/])(?!</a),i','<a href="http://\0">\0</a>',$x); $x = preg_replace(',(?<!=")(?:http|ftp|file)://(?>[^<>[:space:]]+[[:alnum:]/])(?!</a),i','<a href="http://\0">\0</a>',$x); return $x; } and the result is: as you see the first one (<a href) was correctly printed) but the 2 links below weren't transformed to links, so how to fix it THANK YOU. -
function rplLnk($x,$style='') { $x = ereg_replace('[-a-z0-9!#$%&\'*+/=?^_`{|}~]+@([.]?[a-zA-Z0-9_/-])*','<a href=\'mailto:\\0\' '.$style.'>\\0</a>',$x); $x = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href='\\0\' $style>\\0</a>", $x); $x = preg_replace(',(?<!//)www\.[^<>[:space:]]+[[:alnum:]/],i','<a href="http://\0">\0</a>',$x); return $x; } thank you