欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程语言 > php >内容正文

php

php在sql中添加数据,使用php在oracle数据库中插入数据

发布时间:2025/3/19 php 31 豆豆
生活随笔 收集整理的这篇文章主要介绍了 php在sql中添加数据,使用php在oracle数据库中插入数据 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

以下代码生成此代码

Warning: oci_execute() [function.oci-execute]:

ORA-00911: invalid character in F:\wamp\www\SEarch Engine\done.php on line 17

代码是……

include_once('config.php');

$db = oci_new_connect(ORAUSER,ORAPASS,"localhost/XE");

$url_name=$_POST['textfield'];

$keyword_name=$_POST['textarea'];

$cat_news=$_POST['checkbox'];

$cat_sports=$_POST['checkbox2'];

$anchor_text=$_POST['textfield2'];

$description=$_POST['textarea2'];

$sql1="insert into URL(Url_ID,Url_Name,Anchor_Text,Description)

VALUES( 9,".'{$url_name}'.",".'{$anchor_text}'.",".'{$description}'.")";

$result=oci_parse($db,$sql1);

oci_execute($result);

?>

总结

以上是生活随笔为你收集整理的php在sql中添加数据,使用php在oracle数据库中插入数据的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。