Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

help with this code

Featured Replies

$domains_sql = mysql_query("SELECT domains_id, domains_url, keywords_id, keywords_word, domains_comments_comment

 FROM
 (
 SELECT domains_id,domains_url
 FROM domains
 ORDER BY RAND()
 LIMIT 1
 ) as d

 INNER JOIN domains_comments
 ON domains_comments_domain = domains_id

 INNER JOIN domains_keywords
 ON domains_keywords_website = domains_id

 INNER JOIN keywords
 ON domains_keywords_keyword = keywords_id
	 ORDER BY keywords_word ASC") or die (mysql_error());


$num = mysql_num_rows($domains_sql);

$current_price = "";


for($i=0;$i<$num;$i++){


$domains_result = mysql_fetch_array($domains_sql);

$domains_id = $domains_result['domains_id'];
$domains_url = $domains_result['domains_url'];
$domains_name = preg_replace('#^https?://www.#', '', $domains_url);				

$keywords_id = $domains_result['keywords_id'];
$keywords_word = $domains_result['keywords_word'];

$domains_comments = $domains_result['domains_comments_comment'];

if($domains_url != $current_price) {

echo $domains_name."<br /><br />";

$current_price = $domains_url;

}

echo $keywords_word."<br />";
echo $domains_comments."<br />";
}

 

prints out:

 


MS Office
domain 1
MS Office
domain 1 - part 1
MySQL
domain 1
MySQL
domain 1 - part 1
PHP
domain 1
PHP
domain 1 - part 1
Visual Basic
domain 1
Visual Basic
domain 1 - part 1

 

 

and i need it to be:

(info from keywords)



MS Office
MySQL
PHP
Visual Basic

(info from comments)

domain 1
domain 1 - part 1

Try to separate the domain and keyword parts to two for loop.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.