');
while ($yarnarray = mysql_fetch_array ($listyarns)) {
printf ('');
printf ('');
$counter++;
if ($counter % 2 == 0) {
printf ("");
$counter = 10;
}
}
And the processing code:
$yarns = "SELECT yarnid FROM yarns";
$yarnidquery = mysql_query ($yarns) or die ("Error at Yarns " . mysql_error() . "\nWhole Query: " . $yarns);
$yarnarraysetup = mysql_fetch_array ($yarnidquery);
$yarnarray = $yarnarraysetup['yarnid'];
while ($yarnidlist = mysql_fetch_array ($yarnidquery)) {
if ($yarnidlist['yarnid'] == $_POST['$yarnarray']) {
//$yarnprice = "INSERT INTO prices (yarnid, storeid, price) VALUES ('$storeidset', $yarnidlist['yarnid'], $_POST['$yarnarray'])";
//$yarnpriceinsert = mysql_query ($yarnprice) or die ("Error at YarnPrice: " . mysql_error() . "\nWhole Query: " . $yarnprice);
}
}
Question 2:
Is there any way to pass variables through an <a href= > tag? I want to set up the ability to browse through stores without having to use all dropdown menus.

Thanks in advance for all of the help.

Source: http://www.livejournal.com/community/php/335388.html

  • please help

    Date: 08/13/05 (PHP Community)    Keywords: php, html, sql

    I tried to add more games to my arcade on my PHPBB board which is a BBace

    I broke it.

    please help. I do not know much about PHP I am still learning.
    Powered by phpBB © 2001, 2002 phpBB Group
    BBaCE © 2004 created by Shariq Najam





    http://www.a-mommys-world.com/phpBB2/activity.php

    An Error Occurred

    DEBUG MODE

    SQL Error : 1054 Unknown column 'game_avail' in 'where clause'

    SELECT * FROM phpbb_ina_games WHERE game_id <> 0 AND game_avail = 1 ORDER BY played DESC LIMIT 0,10

    Line : 123
    File : /home/amommysw/public_html/phpBB2/includes/functions_arcade.php

    Source: http://www.livejournal.com/community/php/335343.html

  • Dispaying all dated entries in a DB

    Date: 08/14/05 (PHP Community)    Keywords: mysql, database, sql

    I am trying to display a list of all entries in a blog database. Each entry has a date field, of MySQL type "date", but when I try to display all posts in the database, it only shows posts that have a date on or before the current date. Any post-dated entries do not show up.

    This is the query I am running on the database:

    SELECT * FROM `news` WHERE `date` <= '9999-12-31' ORDER BY `date` DESC, `id` DESC

    I have tried not using a "WHERE" attribute, and also tried "WHERE 1"

    Any suggestions?

    Solved! It was in my post display function. That'll teach me to not pay attention to subfunctions.

    Source: http://www.livejournal.com/community/php/335764.html

    1. Distributed development tool?

      Date: 07/26/05 (PHP Community)    Keywords: php, programming, software, database, sql, postgresql, web

      Having recruited a small army to help me code, I've been trying to sort out a distributed development system. The only problem with this is the fact that I can't find a system that caters for what I need, and building one from scratch is a minor ballache (not to mention was taking far too long - that was my original tactic).

      Basically, I need web software that does the following: Bug tracking, project and task management, static content, project and general discussion, SCM/version control (CVS/SVN preferably, SVN looks nicer, either can be installed as needed).

      In real terms, I need something to be able to hand out documentation on the web, throw projects up that people can choose to take on, a bug tracking system (for obvious reasons), somewhere to talk about the projects and in general, and manage code. We've looked at GForge - it's nice, but requires PostgreSQL, and I don't have time to rewrite it into ADODB. Combining that with a wiki (or something similar) plus discussion board would probably fit it beautifully, but again, it'd also mean rewriting the login systems and integrating them - which would be a pain in the neck for two seperate database systems. Tried TUTOS, but it's unrefined, and missing many of the things we need - it's more resource and personnel planning. Flyspray is good for tracking bugs, and MediaWiki is good for static code. phpBB of course is an excellent piece of forum software. But none of them actually fit together. Writing a system to combine them is possible, but expensive in terms of time, as I said earlier.

      I can't find anything that seems to fit the bill. I could write one, but it takes far too long, especially with a one-man programming team.

      Is there anything that anyone knows of out there that may fit the bill? Either that, or it's going to be a long few days coding for me :-/

      (X-posted to my own journal, and a couple of communities.)

      Source: http://www.livejournal.com/community/php/325046.html

    2. Нужны люди с углубленным знанием Flash 2004 Pro

      Date: 07/26/05 (Algorithms)    Keywords: php, mysql, sql, java

      Сабж.Для создание многопользовательской игры на flash.
      Труд будем оплачивать. Можно удалённо. Знание Java и Php. Также очень желательно MySQL.

      Source: http://www.livejournal.com/community/algorithms/61549.html

    3. date range for the current week

      Date: 07/28/05 (PHP Community)    Keywords: mysql, sql

      how can i get the date range for the current week, from sunday to saturday? i.e., this week would be 24-30. i've tried playing around with a the date function but can't figure out how to do this. a mysql query would be ok, too.

      Source: http://www.livejournal.com/community/php/325885.html

    4. subquery question

      Date: 07/29/05 (MySQL Communtiy)    Keywords: mysql, sql, web, google

      I am trying to execute a delete using a subquery but I keep getting the same error and google and mysql.com are both no use as to what the error actually means

      My query is this

      delete from exon where exon_id in(select exon.exon_id from exon left join exon_transcript on exon.exon_id = exon_transcript.exon_id where exon_transcript.exon_id is NULL);


      and this is the error

      ERROR 1093 (HY000): You can't specify target table 'exon' for update in FROM clause

      do you have any ideas what I am doing wrong?

      exon_transcript is a table which links the exon table with another table called transcript and there were a series of rows missing from exon transcript so the links weren't present

      I have been able to use other methods to delete the links from transcript but I can't see any other way of deleting the links from exon

      if you want to see the schema description have a look here

      http://cvsweb.sanger.ac.uk/cgi-bin/cvsweb.cgi/ensembl/sql/table.sql?rev=1.229&view=log

      I am using this version of mysql

      mysql Ver 14.7 Distrib 4.1.12, for dec-osf5.1b (alphaev68) using readline 4.3

      thanks

      Source: http://www.livejournal.com/community/mysql/64885.html

    5. WOO!

      Date: 07/30/05 (Web Development)    Keywords: php, mysql, sql, web

      About a week ago I made a post asking for references on PHP because I had just interviewed for a job at a web design firm and my lack of PHP knowledge was one of the things holding me down. Well, like I said, I spent all weekend studying PHP (thanks for all the references everyone!) and tearing apart existing PHP scripts until I was able to write my own scripts without using any reference. By Tuesday I had written a blog system using PHP and MySQL (complete with login authentication using sessions, add, edit and delete entries, and add or remove posters on the system, plus much much more...which, I'm pretty sure you would agree is a pretty easy task, but having only started learning PHP three days prior, I'm quite proud of myself).

      Anyway, I went in for the second interview on Wednesday this week and showed them what I had accomplished over the four days between interviews.

      This morning I got a call from them offering the job to me :o) I start on the 15th.

      Anyway, I just wanted to thank everyone for hooking me up with the PHP references.

      Source: http://www.livejournal.com/community/webdev/228601.html

    6. WOO!

      Date: 07/30/05 (WebDesign)    Keywords: php, mysql, sql, web

      About a week ago I made a post asking for references on PHP because I had just interviewed for a job at a web design firm and my lack of PHP knowledge was one of the things holding me down. Well, like I said, I spent all weekend studying PHP (thanks for all the references everyone!) and tearing apart existing PHP scripts until I was able to write my own scripts without using any reference. By Tuesday I had written a blog system using PHP and MySQL (complete with login authentication using sessions, add, edit and delete entries, and add or remove posters on the system, plus much much more...which, I'm pretty sure you would agree is a pretty easy task, but having only started learning PHP three days prior, I'm quite proud of myself).

      Anyway, I went in for the second interview on Wednesday this week and showed them what I had accomplished over the four days between interviews.

      This morning I got a call from them offering the job to me :o) I start on the 15th.

      Anyway, I just wanted to thank everyone for hooking me up with the PHP references.

      Source: http://www.livejournal.com/community/webdesign/942191.html

    7. Programming (part two)

      Date: 07/31/05 (Computer Geeks)    Keywords: php, programming, software, css, html, xml, database, asp, sql, java, security, web

      A few weeks ago, I asked about programming languages and which I should learn, and your reaction had me thinking that I could have offered more info about what I hoped to do with computers. My request was so vague that I can see why you found it difficult to reply. Perhaps this time I'll do better.

      To make things easier, I'm providing a list of what I want to do, and I ask you if you know what languages or applications I should consider in order to fulfill my technological goals.

      I'd like to:

      1. build web pages
      2. provide internet security for large & small clients
      3. make computer games
      4. build my own OS from scratch (a big task, I know)
      5. create, edit, download, and manipulate multi-media images and files
      6. develop application software
      7. build and manage my own server
      8. develop databases
      9. get a general feel for everything else, in case I ever need it


      So my current list of stuff I wish to learn now includes:
      • Java
      • Java Script
      • Perl
      • C, C+, & C++
      • PHP
      • SQL
      • CSS
      • HTML
      • XML
      • Adobe Photoshop
      • Adobe Illustrator
      • Flash & Dreamweaver
      • .Net (VB.net, ASP.net, C#)
      • CGI

      If you know anything about the above, feel free to post:

      What are each of the above used for? How did it come out? Are any of them similar or used for similar tasks? Etc., etc., etc.

      Finally, I was told to learn some Assembly language, but unless I am mistaken, I think I learned that already. If someone could give me a rundown on what it is, I could be sure if its what I think it is. I think I learned 8086 in my day (came with a card, too), so all I have to do is review it I think.

      Your help and suggestions are welcome and I thank you in advance for your time.

      Source: http://www.livejournal.com/community/computergeeks/740093.html

    8. Phat C# Database Tool

      Date: 08/02/05 (C Sharp)    Keywords: mysql, sql

      I am nearly done with a DB Tool for C# and MySQL. Please See My Entry for more details...

      Source: http://www.livejournal.com/community/csharp/32384.html

    9. Cheat Sheets

      Date: 08/05/05 (Web Development)    Keywords: php, mysql, css, xml, sql, java

      ILoveJackDaniels.com has some really great cheat sheets that you may find handy.



      He just added some javascript cheats which includes XMLHTTPRequest cheats, function cheats, etc.

      http://www.ilovejackdaniels.com/cheat-sheets/

      He has Javascript cheats, PHP cheats, RGB Hex Color chart, mySQL, CSS, mod_rewrite, regular expressions and others.

      x-posted to '[info]'itprofessionals.

      Source: http://www.livejournal.com/community/webdev/231417.html

    10. Cheat Sheets

      Date: 08/05/05 (IT Professionals)    Keywords: php, mysql, css, xml, sql, java, web

      ILoveJackDaniels.com has some really great cheat sheets that you may find handy.



      He just added some javascript cheats which includes XMLHTTPRequest cheats, function cheats, etc.

      http://www.ilovejackdaniels.com/cheat-sheets/

      He has Javascript cheats, PHP cheats, RGB Hex Color chart, mySQL, CSS, mod_rewrite, regular expressions and others.

      x-posted to '[info]'webdev.

      ps. Are any of you from the Bay Area?

      Source: http://www.livejournal.com/community/itprofessionals/16669.html

    11. InnoDB

      Date: 08/05/05 (MySQL Communtiy)    Keywords: php, mysql, sql, web, apache

      hey guys, me again -

      i've got mysql 4.1.13a-nt running on win xp pro (apache and php4 as well, shouldn't be relevant tho) and I'm trying to set up and use InnoDB (for the foreign keys) - whenever I make a new table in EMS MySQL Manager or through the command-line utility and try to set it as InnoDB, when the table appears, it's always MyISAM

      I'm sure my MySQL Manager version supports InnoDB since it works when I create an InnoDB table on my webhost, it's only not working locally

      I did the InnoDB config on install of MySQL - is there anything else I have to set or enable to use InnoDB?

      Source: http://www.livejournal.com/community/mysql/65658.html

    12. The Holy Grail of PHP

      Date: 08/09/05 (PHP Community)    Keywords: php, database, sql, web

      Thought I'd share this with the community. I'll be writing a real walkthrough soon, as this combo is too good to keep to myself.
      Would love to hear any comments, criticisms, or alternatives. If anyone is interested in helping write a few pages on the topic, send me an email or something too.


      What do you get when you combine an automated database object abstraction layer, an embedded templating engine, and an AJAX library?

      Unparalled rapid modular development fusing the web's hottest technologies.
      And it's easy.

      PEAR DB_DataObject
      PHP Smarty
      xajax

      What's it look like? Here's a teenie example.

      index.php

      
      
      
      
      	
      		printJavascript(); ?>
      		Test
      	
      	
      		
      ID:



      ajax.php
      addAssign("content","innerHTML", $v->getNote($id));
      
      	return $objResponse->getXML();
      }
      
      $xajax = new xajax();
      
      $xajax->registerFunction("getNote");
      $xajax->processRequests();
      ?>



      template.php
      template_dir = 'tpl/';
      		$this->compile_dir = 'tpl/comp';
      		$this->config_dir = 'tpl/conf';
      		$this->cache_dir = 'tpl/cache';
      	}
      
      	function getNote($id = null) {
      		$note = DB_DataObject::Factory('notes');
      		$note->get($id);
      		$this->assign('note', $note);
      		return $this->fetch('note.tpl');
      	}
      }
      ?>



      tpl/note.tpl
      {$note->name}
      {$note->body}



      data.php



      schema.sql
      CREATE DATABASE organizer;
      USE organizer;
      
      CREATE TABLE notes (
      	id INT UNSIGNED NOT NULL AUTO_INCREMENT,
      	name VARCHAR(32),
      	body TEXT,
      	PRIMARY KEY(id)
      );




      Source: http://www.livejournal.com/community/php/333380.html

    13. loading descriptions under a full-size image run by JS?

      Date: 08/11/05 (Web Development)    Keywords: php, mysql, sql

      I posted in '[info]'php but no one has given me help yet. I'm x-posting here in hopes there is someone in here that isn't in '[info]'php that can help me. Here's my question.

      Uh... Is it possible to insert some sort of php echo to display descriptions under a picture?

      It's not the same as exif_read_data, because these pictures are my scanned artwork images, not photographs. I have been searching for some sort of script or explanation on how to do this, but can't find it so I'm asking here.

      This is the page in question:
      http://www.luckycatstudio.com/galleries/World/index.php

      The six thumbnails at the top, are scripted in JS for onClick action, on a php page (for php includes and date functions), to load the full sized image below the row of thumbnails. I want to add an area under each full-sized picture that will display a description of what the picture is about each time a picture is clicked on. I'm thinking something in php's echo function. But how would it get the description of the image if not an exif? Save the description in separate individual files? Embed the description in the image in my Photoshop 7's File Info option? Or iPhoto? Use MySql?

      Anyway, I'm fairly sure that there are better PHP codes for onClick loading and displaying full-size images with their descriptions.

      If anyone can help me, I'd greatly appreciate it.

      Thanks.

      Source: http://www.livejournal.com/community/webdev/233503.html

    14. PHP Question

      Date: 08/11/05 (PHP Community)    Keywords: php, mysql, sql

      Uh... Is it possible to insert some sort of php echo to display descriptions under a picture?

      It's not the same as exif_read_data, because these pictures are my scanned artwork images, not photographs. I have been searching for some sort of script or explanation on how to do this, but can't find it so I'm asking here.

      This is the page in question:
      http://www.luckycatstudio.com/galleries/World/index.php

      The six thumbnails at the top, are scripted in JS for onClick action, on a php page (for php includes and date functions), to load the full sized image below the row of thumbnails. I want to add an area under each full-sized picture that will display a description of what the picture is about each time a picture is clicked on. I'm thinking something in php's echo function. But how would it get the description of the image if not an exif? Save the description in separate individual files? Embed the description in the image in my Photoshop 7's File Info option? Or iPhoto? Use MySql?

      Anyway, I'm fairly sure that there are better PHP codes for onClick loading and displaying full-size images with their descriptions.

      If anyone can help me, I'd greatly appreciate it.

      Thanks.

      Source: http://www.livejournal.com/community/php/334132.html

    15. huh.

      Date: 08/12/05 (Asp Dot Net)    Keywords: sql, microsoft

      gotta love it when you research a weird error you're getting and microsoft says this.

      SYMPTOMS
      When you use the Microsoft Visual Studio .NET debugger to debug an ActiveX Data Objects (ADO) application that contains Transact-SQL code, you may receive the following error message:
      System.Data.SqlClient.SqlException: General network error. Check your network documentation.
      You may notice this behavior when you restart Microsoft SQL Server while debugging the ADO application.
      Back to the top Back to the top

      STATUS
      This behavior is by design.

      ...

      BY DESIGN?

      ok, microsoft. you win today. :|

      anyways, on a related but not so related note.. our middle tier component that handles data connections started giving us the infamous "General network error. Check your network documentation." upon an executenonquery call on a stored procedure after we applied service pack 4 on SQL Server. anyone know why oh why SP4 is doing this?

      please enlighten while i sniff out the chatter on the .NET boards.

      xposted to '[info]'sqlserver and '[info]'csharp

      Source: http://www.livejournal.com/community/aspdotnet/39907.html

    16. hmm.

      Date: 08/12/05 (SQL Server)    Keywords: asp, sql, microsoft

      gotta love it when you research a weird error you're getting and microsoft says this.

      SYMPTOMS
      When you use the Microsoft Visual Studio .NET debugger to debug an ActiveX Data Objects (ADO) application that contains Transact-SQL code, you may receive the following error message:
      System.Data.SqlClient.SqlException: General network error. Check your network documentation.
      You may notice this behavior when you restart Microsoft SQL Server while debugging the ADO application.
      Back to the top Back to the top

      STATUS
      This behavior is by design.

      ...

      BY DESIGN?

      ok, microsoft. you win today. :|

      anyways, on a related but not so related note.. our middle tier component that handles data connections started giving us the infamous "General network error. Check your network documentation." upon an executenonquery call on a stored procedure after we applied service pack 4 on SQL Server. anyone know why oh why SP4 is doing this?

      please enlighten while i sniff out the chatter on the .NET boards.

      xposted to '[info]'aspdotnet and '[info]'csharp

      Source: http://www.livejournal.com/community/sqlserver/30271.html

    17. hmm

      Date: 08/12/05 (C Sharp)    Keywords: asp, sql, microsoft

      gotta love it when you research a weird error you're getting and microsoft says this.

      SYMPTOMS
      When you use the Microsoft Visual Studio .NET debugger to debug an ActiveX Data Objects (ADO) application that contains Transact-SQL code, you may receive the following error message:
      System.Data.SqlClient.SqlException: General network error. Check your network documentation.
      You may notice this behavior when you restart Microsoft SQL Server while debugging the ADO application.
      Back to the top Back to the top

      STATUS
      This behavior is by design.

      ...

      BY DESIGN?

      ok, microsoft. you win today. :|

      anyways, on a related but not so related note.. our middle tier component that handles data connections started giving us the infamous "General network error. Check your network documentation." upon an executenonquery call on a stored procedure after we applied service pack 4 on SQL Server. anyone know why oh why SP4 is doing this?

      please enlighten while i sniff out the chatter on the .NET boards.

      xposted to '[info]'sqlserver and '[info]'aspdotnet

      Source: http://www.livejournal.com/community/csharp/32809.html

    18. Two Questions

      Date: 08/13/05 (PHP Community)    Keywords: php, mysql, database, sql, web

      [Error: Irreparable invalid markup ('') in entry. Owner must fix manually. Raw contents below.]

      Hi everyone. I am new to the group, and also relatively new to PHP. I have two questions relating to a website that I am setting up. Brief description:
      This is a website that lists reviews of yarn stores. Included in the information that it captures is the price of certain yarns.
      Question 1:
      If I am using an array to call the &lt;input name = xyz&gt;, how do I write my insert statement to use it?
      This is what I have so far, but I am very skeptical that it would work:

      The form code:
      $dbh=mysql_connect ("host", "username", "password") or die ('I cannot connect to the database because: ' . mysql_error());
      mysql_select_db ("knittin1_yarnstore");
      $getyarns = "SELECT yarnid, yarnco, yarnname FROM yarns";
      $listyarns = mysql_query ($getyarns) or die ("Error at ListYarns: " . mysql_error() . "\n Whole Query: " . $getyarns);
      $counter = 10;
      printf ('
    ' . $yarnarray['yarnco'] . " " . $yarnarray['yarnname'] . '$
    Previous page  ||  Next page


    antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home