我的一个one.php页面下:
<?php
include("conn.php");
$rs=mysql_query("
(
select op_values from table1 where op.id=11
)union
(
select op_values from table2 where op.id=12
)
while($row=mysql_fetch_array($rs))
{
echo "$row[op_values]<br/> ";
}
?>
two.php页面下:
<?php
include("conn.php");define('ID_OUTPUT_VOLTAGE', 31);
define('ID_OUTPUT_CURRENT', 35);$V = getProductAttributes(ID_V, $p_id);
$A = getProductAttributes(ID_A, $p_id);function getProductAttributes(){
这里面不会写呢,想把sql的两个值op_values给弄过来,echo 出来
}然后w=V*A;
<?php
include("conn.php");
$rs=mysql_query("
(
select op_values from table1 where op.id=11
)union
(
select op_values from table2 where op.id=12
)
while($row=mysql_fetch_array($rs))
{
echo "$row[op_values]<br/> ";
}
?>
two.php页面下:
<?php
include("conn.php");define('ID_OUTPUT_VOLTAGE', 31);
define('ID_OUTPUT_CURRENT', 35);$V = getProductAttributes(ID_V, $p_id);
$A = getProductAttributes(ID_A, $p_id);function getProductAttributes(){
这里面不会写呢,想把sql的两个值op_values给弄过来,echo 出来
}然后w=V*A;
解决方案 »
- 获取文件列表,点击文件名打开文件的方法,哪位有时间帮帮忙啊
- 如何把汉字转换成GB2312格式呢?
- Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES)
- 探索缓存的基本疑问:下面这个ob函数为何无法写入4.txt?
- 高手请看,很奇怪的状况
- 终于到五个三角了。散分
- ob_start()的问题……
- 有关session的主问题。
- 为什么我的模拟登陆登陆时候验证码总是错误
- thinkphp sql语句报错 参数号无效,未定义参数,代码如下,求大佬指教
- php从mysql中获取图片并显示
- 开发php聊天室中关于session的问题
{
// echo "$row[op_values]<br/> "; //如果只是为了传值就不用输出
$arr[]= $row[op_values]; }two.php包含one.php,就可以用$arr数组了。
当然你也可以使用session传值。
当然你也可以使用session传值。??不理解,可以说得更细点么